diff --git a/.github/actions/setup-os/setup-alpine.sh b/.github/actions/setup-os/setup-alpine.sh index 990accb7..9ce3666c 100755 --- a/.github/actions/setup-os/setup-alpine.sh +++ b/.github/actions/setup-os/setup-alpine.sh @@ -8,7 +8,6 @@ apk update apk add \ bash \ build-base \ - coreutils \ clang \ git \ gtk-doc \ diff --git a/.gitignore b/.gitignore index 55915135..65d02aee 100644 --- a/.gitignore +++ b/.gitignore @@ -1,32 +1,9 @@ -*.o -*.gcda -*.gcno -*.pc /*.tar.xz /*.md5sum /*.mbx /*.cover -.deps/ -.libs/ -/Makefile -/Makefile.in -/aclocal.m4 -/autom4te.cache/ -/build-aux/ -/config.h -/config.h.in -/config.log -/config.status -/configure -/cov-int -/coverage -/gtk-doc.make -/gtk-doc.m4 /kmod-*.tar.* -/libtool -/stamp-h1 -/test-suite.log /build /build-* diff --git a/libkmod/.gitignore b/libkmod/.gitignore deleted file mode 100644 index 826fd623..00000000 --- a/libkmod/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.dirstamp -.deps/ -.libs/ -*.la -*.lo -libkmod.pc diff --git a/libkmod/docs/.gitignore b/libkmod/docs/.gitignore deleted file mode 100644 index 7514b08b..00000000 --- a/libkmod/docs/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -*.bak -*.stamp -*.sgml -libkmod.* -libkmod-*.xml -!libkmod-docs.xml -libkmod-*.txt -!libkmod-sections.txt -version.xml -xml -html -gtk-doc.make -Makefile -Makefile.in diff --git a/libkmod/docs/meson.build b/libkmod/docs/meson.build index b4d41cc3..b0a47ef8 100644 --- a/libkmod/docs/meson.build +++ b/libkmod/docs/meson.build @@ -10,12 +10,12 @@ built_docs = gnome.gtkdoc( 'libkmod', content_files : version_file, ignore_headers : [ - '@0@/libkmod/libkmod-index.h'.format(meson.project_source_root()), - '@0@/libkmod/libkmod-internal-file.h'.format(meson.project_source_root()), - '@0@/libkmod/libkmod-internal.h'.format(meson.project_source_root()), + f'@project_source_root@/libkmod/libkwod-index.h', + f'@project_source_root@/libkmod/libkmod-internal-file.h', + f'@project_source_root@/libkmod/libkmod-internal.h', ], scan_args : '--ignore-decorators="KMOD_EXPORT"', - src_dir : '@0@/libkmod/'.format(meson.project_source_root()), + src_dir : f'@project_source_root@/libkmod/', namespace : 'kmod', module_version : '3', main_xml : 'libkmod-docs.xml', diff --git a/man/.gitignore b/man/.gitignore deleted file mode 100644 index a229b2f7..00000000 --- a/man/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*.5 -*.8 -Makefile -Makefile.in diff --git a/man/depmod.8.scd b/man/depmod.8.scd index 1cb6cfc2..d0c25b1d 100644 --- a/man/depmod.8.scd +++ b/man/depmod.8.scd @@ -10,7 +10,7 @@ depmod - Generate modules.dep and map files. \ \ \ \ \ \ \ \[*-F* _System.map_] [*-n*] [*-v*] [*-A*] [*-P* _prefix_] [*-w*] [_version_] *depmod* [*-e*] [*-E* _Module.symvers_] [*-F* _System.map_] [*-n*] [*-v*] [*-P* _prefix_] -\ \ \ \ \ \ \ \[*-w*] [_version_] [_filename_...] +\ \ \ \ \ \ \ \[*-w*] [_version_] [_filename_] # DESCRIPTION @@ -155,27 +155,6 @@ depmod -b /tmp/build -m kernel-modules *-w* Warn on duplicate dependencies, aliases, symbol versions, etc. -# COPYRIGHT - -This manual page originally Copyright 2002, Rusty Russell, IBM Corporation. -Portions Copyright Jon Masters, and others. - # SEE ALSO *depmod.d*(5), *modprobe*(8), *modules.dep*(5) - -# BUGS - -Please direct any bug reports to kmod's issue tracker at -https://github.com/kmod-project/kmod/issues/ alongside with version used, steps -to reproduce the problem and the expected outcome. - -# AUTHORS - -Numerous contributions have come from the linux-modules mailing list - and Github. If you have a clone of kmod.git -itself, the output of *git-shortlog*(1) and *git-blame*(1) can show you the -authors for specific parts of the project. - -*Lucas De Marchi* is the current maintainer of the -project. diff --git a/man/depmod.d.5.scd b/man/depmod.d.5.scd index cb8de4de..10861162 100644 --- a/man/depmod.d.5.scd +++ b/man/depmod.d.5.scd @@ -49,7 +49,7 @@ later). # COMMANDS -search _subdirectory..._ +search _subdirectory_ This allows you to specify the order in which @MODULE_DIRECTORY@ (or other configured module location) subdirectories will be processed by *depmod*. Directories are listed in order, with the highest priority @@ -79,7 +79,7 @@ override _modulename_ _kernelversion_ _modulesubdirectory_ module location) will take priority over any likenamed module already provided by the kernel. -external _kernelversion_ _absolutemodulesdirectory..._ +external _kernelversion_ _absolutemodulesdirectory_ This specifies a list of directories, which will be checked according to the priorities in the *search* command. The order matters also, the first directory has the higher priority. @@ -100,19 +100,3 @@ This manual page Copyright 2006-2010, Jon Masters, Red Hat, Inc. # SEE ALSO *depmod*(8) - -# BUGS - -Please direct any bug reports to kmod's issue tracker at -https://github.com/kmod-project/kmod/issues/ alongside with version used, steps -to reproduce the problem and the expected outcome. - -# AUTHORS - -Numerous contributions have come from the linux-modules mailing list - and Github. If you have a clone of kmod.git -itself, the output of *git-shortlog*(1) and *git-blame*(1) can show you the -authors for specific parts of the project. - -*Lucas De Marchi* is the current maintainer of the -project. diff --git a/man/insmod.8.scd b/man/insmod.8.scd index ec53f8fb..a9a32c83 100644 --- a/man/insmod.8.scd +++ b/man/insmod.8.scd @@ -6,7 +6,7 @@ insmod - Simple program to insert a module into the Linux Kernel # SYNOPSIS -*insmod* [_OPTIONS_] [_filename_] [_module options_] +*insmod* [_OPTIONS_] _filename_ [_module options_] # DESCRIPTION @@ -62,19 +62,3 @@ This manual page originally Copyright 2002, Rusty Russell, IBM Corporation. # SEE ALSO *modprobe*(8), *rmmod*(8), *lsmod*(8), *modinfo*(8), *depmod*(8) - -# BUGS - -Please direct any bug reports to kmod's issue tracker at -https://github.com/kmod-project/kmod/issues/ alongside with version used, steps -to reproduce the problem and the expected outcome. - -# AUTHORS - -Numerous contributions have come from the linux-modules mailing list - and Github. If you have a clone of kmod.git -itself, the output of *git-shortlog*(1) and *git-blame*(1) can show you the -authors for specific parts of the project. - -*Lucas De Marchi* is the current maintainer of the -project. diff --git a/man/kmod.8.scd b/man/kmod.8.scd index b196bc1d..cf8a0e47 100644 --- a/man/kmod.8.scd +++ b/man/kmod.8.scd @@ -6,7 +6,7 @@ kmod - Program to manage Linux Kernel modules # SYNOPSIS -*kmod* [*OPTIONS...*] [_COMMAND_] [*COMMAND_OPTIONS...*] +*kmod* [*OPTIONS*] [_COMMAND_] [*COMMAND_OPTIONS*] # DESCRIPTION @@ -40,23 +40,3 @@ This manual page originally Copyright 2014, Marco d'Itri. # SEE ALSO *lsmod*(8), *rmmod*(8), *insmod*(8), *modinfo*(8), *modprobe*(8), *depmod*(8) - -# BUGS - -Please direct any bug reports to kmod's issue tracker at -https://github.com/kmod-project/kmod/issues/ alongside with version used, steps -to reproduce the problem and the expected outcome. - -# AUTHOR - -*kmod* project was started by Lucas De Marchi as a drop-in replacement to -module-init-tools that was maintained by Jon Masters, adding a library (libkmod) -and additional features. - -Numerous contributions have come from the linux-modules mailing list - and Github. If you have a clone of kmod.git -itself, the output of *git-shortlog*(1) and *git-blame*(1) can show you the -authors for specific parts of the project. - -*Lucas De Marchi* is the current maintainer of the -project. diff --git a/man/lsmod.8.scd b/man/lsmod.8.scd index 339526df..9147a4ad 100644 --- a/man/lsmod.8.scd +++ b/man/lsmod.8.scd @@ -35,19 +35,3 @@ This manual page originally Copyright 2002, Rusty Russell, IBM Corporation. # SEE ALSO *insmod*(8), *modprobe*(8), *modinfo*(8), *depmod*(8) - -# BUGS - -Please direct any bug reports to kmod's issue tracker at -https://github.com/kmod-project/kmod/issues/ alongside with version used, steps -to reproduce the problem and the expected outcome. - -# AUTHORS - -Numerous contributions have come from the linux-modules mailing list - and Github. If you have a clone of kmod.git -itself, the output of *git-shortlog*(1) and *git-blame*(1) can show you the -authors for specific parts of the project. - -*Lucas De Marchi* is the current maintainer of the -project. diff --git a/man/meson.build b/man/meson.build index a9eb3cf0..3c24d58d 100644 --- a/man/meson.build +++ b/man/meson.build @@ -17,21 +17,20 @@ foreach tuple : _man_pages man = tuple[1] custom_target( - 'man_@0@_@1@'.format(section, man), + f'man_@section@_@man@', command : [ build_scdoc, scdoc, - '@INPUT@', 's|@SYSCONFDIR@|@0@|g;'.format(sysconfdir) + 's|@DISTCONFDIR@|@0@|g;'.format(distconfdir) + 's|@MODULE_DIRECTORY@|@0@|g;'.format(moduledir), + '@INPUT@', ], - input : '@0@.@1@.scd'.format(man, section), - output : '@0@.@1@'.format(man, section), + input : [f'@man@.@section@.scd', files('trailer.scd')], + output : f'@man@.@section@', capture : true, - build_by_default : get_option('manpages'), - install : true, - install_dir : get_option('mandir') / 'man@0@'.format(section) + install : get_option('manpages'), + install_dir : get_option('mandir') / f'man@section@', ) endforeach @@ -46,12 +45,11 @@ foreach tuple : _man_aliases dest = tuple[2] custom_target( - 'man_@0@_@1@'.format(section, man), - command : ['echo', '.so @0@'.format(dest)], - output : '@0@.@1@'.format(man, section), + f'man_@section@_@man@', + command : ['echo', f'.so @dest@'], + output : f'@man@.@section@', capture : true, - build_by_default : get_option('manpages'), - install : true, - install_dir : get_option('mandir') / 'man@0@'.format(section) + install : get_option('manpages'), + install_dir : get_option('mandir') / f'man@section@', ) endforeach diff --git a/man/modinfo.8.scd b/man/modinfo.8.scd index 5d66fac4..2469f38e 100644 --- a/man/modinfo.8.scd +++ b/man/modinfo.8.scd @@ -6,7 +6,7 @@ modinfo - Show information about a Linux Kernel module # SYNOPSIS -*modinfo* [*-0*] [*-F* _field_] [*-k* _kernel_] [modulename|filename...] +*modinfo* [*-0*] [*-F* _field_] [*-k* _kernel_] _modulename_|_filename_ *modinfo* *-V* @@ -69,19 +69,3 @@ This manual page originally Copyright 2003, Rusty Russell, IBM Corporation. # SEE ALSO *modprobe*(8) - -# BUGS - -Please direct any bug reports to kmod's issue tracker at -https://github.com/kmod-project/kmod/issues/ alongside with version used, steps -to reproduce the problem and the expected outcome. - -# AUTHORS - -Numerous contributions have come from the linux-modules mailing list - and Github. If you have a clone of kmod.git -itself, the output of *git-shortlog*(1) and *git-blame*(1) can show you the -authors for specific parts of the project. - -*Lucas De Marchi* is the current maintainer of the -project. diff --git a/man/modprobe.8.scd b/man/modprobe.8.scd index aaf04c34..12c72fdd 100644 --- a/man/modprobe.8.scd +++ b/man/modprobe.8.scd @@ -6,14 +6,14 @@ modprobe - Add and remove modules from the Linux Kernel # SYNOPSIS -*modprobe* [*-v*] [*-V*] [*-C* _config-file_] [*-n*] [*-i*] [*-q*] [*-b*] [_modulename_] -\ \ \ \ \ \ \ \ \ \[_module parameters_...] +*modprobe* [*-v*] [*-V*] [*-C* _config-file_] [*-n*] [*-i*] [*-q*] [*-b*] _modulename_ +\ \ \ \ \ \ \ \ \ \[_module parameters_] -*modprobe* [*-r*] [*-v*] [*-n*] [*-i*] [_modulename_...] +*modprobe* [*-r*] [*-v*] [*-n*] [*-i*] _modulename_ *modprobe* [*-c*] -*modprobe* [*--show-modversions*] [_filename_] +*modprobe* [*--show-modversions*] _filename_ # DESCRIPTION @@ -229,19 +229,3 @@ This manual page originally Copyright 2002, Rusty Russell, IBM Corporation. # SEE ALSO *modprobe.d*(5), *insmod*(8), *rmmod*(8), *lsmod*(8), *modinfo*(8), *depmod*(8) - -# BUGS - -Please direct any bug reports to kmod's issue tracker at -https://github.com/kmod-project/kmod/issues/ alongside with version used, steps -to reproduce the problem and the expected outcome. - -# AUTHORS - -Numerous contributions have come from the linux-modules mailing list - and Github. If you have a clone of kmod.git -itself, the output of *git-shortlog*(1) and *git-blame*(1) can show you the -authors for specific parts of the project. - -*Lucas De Marchi* is the current maintainer of the -project. diff --git a/man/modprobe.conf.5 b/man/modprobe.conf.5 deleted file mode 100644 index 07e777a0..00000000 --- a/man/modprobe.conf.5 +++ /dev/null @@ -1 +0,0 @@ -.so modprobe.d.5 diff --git a/man/modprobe.d.5.scd b/man/modprobe.d.5.scd index 5d028e23..334b382b 100644 --- a/man/modprobe.d.5.scd +++ b/man/modprobe.d.5.scd @@ -77,7 +77,7 @@ blacklist _modulename_ *blacklist* keyword indicates that all of that particular module's internal aliases are to be ignored. -install _modulename_ _command..._ +install _modulename_ _command_ This command instructs *modprobe* to run your command instead of inserting the module in the kernel as normal. The command can be any shell command: this allows you to do any kind of complex processing you @@ -108,7 +108,7 @@ install _modulename_ _command..._ /sbin/modprobe barney; /sbin/modprobe --ignore-install fred $CMDLINE_OPTS" -options _modulename_ _option..._ +options _modulename_ _option_ This command allows you to add options to the module _modulename_ (which might be an alias) every time it is inserted into the kernel: whether directly (using *modprobe* _modulename_) or because the module being @@ -117,11 +117,11 @@ options _modulename_ _option..._ All options are added together: they can come from an *option* for the module itself, for an alias, and on the command line. -remove _modulename_ _command..._ +remove _modulename_ _command_ This is similar to the *install* command above, except it is invoked when "modprobe -r" is run. -softdep _modulename_ pre: _modules..._ post: _modules..._ +softdep _modulename_ pre: _modules_ post: _modules_ The *softdep* command allows you to specify soft, or optional, module dependencies. _modulename_ can be used without these optional modules installed, but usually with some features missing. For example, a driver @@ -141,7 +141,7 @@ softdep _modulename_ pre: _modules..._ post: _modules..._ Note: if there are *install* or *remove* commands with the same _modulename_ argument, *softdep* takes precedence. -weakdep _modulename_ _modules..._ +weakdep _modulename_ _modules_ The *weakdep* command allows you to specify weak module dependencies. Those are similar to pre softdep, with the difference that userspace doesn't attempt to load that dependency before the specified module. @@ -171,19 +171,3 @@ This manual page originally Copyright 2004, Rusty Russell, IBM Corporation. # SEE ALSO *modprobe*(8), *modules.dep*(5) - -# BUGS - -Please direct any bug reports to kmod's issue tracker at -https://github.com/kmod-project/kmod/issues/ alongside with version used, steps -to reproduce the problem and the expected outcome. - -# AUTHORS - -Numerous contributions have come from the linux-modules mailing list - and Github. If you have a clone of kmod.git -itself, the output of *git-shortlog*(1) and *git-blame*(1) can show you the -authors for specific parts of the project. - -*Lucas De Marchi* is the current maintainer of the -project. diff --git a/man/modules.dep.5.scd b/man/modules.dep.5.scd index 37c38bf0..5fa6bf97 100644 --- a/man/modules.dep.5.scd +++ b/man/modules.dep.5.scd @@ -33,19 +33,3 @@ This manual page originally Copyright 2002, Rusty Russell, IBM Corporation. # SEE ALSO *depmod*(8), *modprobe*(8) - -# BUGS - -Please direct any bug reports to kmod's issue tracker at -https://github.com/kmod-project/kmod/issues/ alongside with version used, steps -to reproduce the problem and the expected outcome. - -# AUTHORS - -Numerous contributions have come from the linux-modules mailing list - and Github. If you have a clone of kmod.git -itself, the output of *git-shortlog*(1) and *git-blame*(1) can show you the -authors for specific parts of the project. - -*Lucas De Marchi* is the current maintainer of the -project. diff --git a/man/modules.dep.bin.5 b/man/modules.dep.bin.5 deleted file mode 100644 index 795636b7..00000000 --- a/man/modules.dep.bin.5 +++ /dev/null @@ -1 +0,0 @@ -.so modules.dep.5 diff --git a/man/rmmod.8.scd b/man/rmmod.8.scd index 2f6bd56c..66bc8487 100644 --- a/man/rmmod.8.scd +++ b/man/rmmod.8.scd @@ -6,7 +6,7 @@ rmmod - Simple program to remove a module from the Linux Kernel # SYNOPSIS -*rmmod* [_OPTIONS_] [_list of modulenames_] +*rmmod* [_OPTIONS_] _modulenames_ # DESCRIPTION @@ -48,19 +48,3 @@ This manual page originally Copyright 2002, Rusty Russell, IBM Corporation. # SEE ALSO *modprobe*(8), *insmod*(8), *lsmod*(8), *modinfo*(8), *depmod*(8) - -# BUGS - -Please direct any bug reports to kmod's issue tracker at -https://github.com/kmod-project/kmod/issues/ alongside with version used, steps -to reproduce the problem and the expected outcome. - -# AUTHORS - -Numerous contributions have come from the linux-modules mailing list - and Github. If you have a clone of kmod.git -itself, the output of *git-shortlog*(1) and *git-blame*(1) can show you the -authors for specific parts of the project. - -*Lucas De Marchi* is the current maintainer of the -project. diff --git a/man/trailer.scd b/man/trailer.scd new file mode 100644 index 00000000..fa532479 --- /dev/null +++ b/man/trailer.scd @@ -0,0 +1,20 @@ + +# AUTHORS + +Numerous contributions have come from the linux-modules mailing list + and Github. If you have a clone of kmod.git +itself, the output of *git-shortlog*(1) and *git-blame*(1) can show you the +authors for specific parts of the project. + +*Lucas De Marchi* is the current maintainer of the +project. + +# BUGS + +Please direct any bug reports to kmod's issue tracker at +https://github.com/kmod-project/kmod/issues/ alongside with version used, steps +to reproduce the problem and the expected outcome. + +# COPYRIGHT + +FOOBAR diff --git a/meson.build b/meson.build index 5740e135..805683a7 100644 --- a/meson.build +++ b/meson.build @@ -36,7 +36,8 @@ _funcs = [ 'secure_getenv', ] foreach func : _funcs - cdata.set10('HAVE_@0@'.format(func.to_upper()), cc.has_function(func, args : '-D_GNU_SOURCE')) + func_to_upper = func.to_upper() + cdata.set10(f'HAVE_@func_to_upper@', cc.has_function(func, args : '-D_GNU_SOURCE')) endforeach # Meson has some amount of support for finding builtins by passing the symbol @@ -57,12 +58,13 @@ foreach tuple : _builtins args = tuple[1] required = tuple[2] # XXX: meson 1.5.0 has links(... required ) flag - have = cc.links('int main(void){@0@(@1@);return 0;}'.format(builtin, args)) + have = cc.links(f'int main(void){@builtin@(@args@);return 0;}') if required and not have - error('required builtin function not found: @0@'.format(builtin)) + error(f'required builtin function not found: @builtin@') endif - cdata.set10('HAVE_@0@'.format(builtin.to_upper()), have) + builtin_to_upper = builtin.to_upper() + cdata.set10(f'HAVE_@builtin_to_upper@', have) endforeach # basename may be only available in libgen.h with the POSIX behavior, @@ -75,7 +77,8 @@ foreach tuple : _decls decl = tuple[0] header = tuple[1] have = cc.has_header_symbol(header, decl, args : '-D_GNU_SOURCE') - cdata.set10('HAVE_DECL_@0@'.format(decl.to_upper()), have) + decl_to_upper = decl.to_upper() + cdata.set10(f'HAVE_DECL_@decl_to_upper@', have) endforeach cdata.set10('HAVE_STATIC_ASSERT', cc.compiles('_Static_assert(1, "Test");', name : '_Static_assert')) @@ -158,6 +161,9 @@ dlopen_all = get_option('dlopen').contains('all') # Directories #------------------------------------------------------------------------------- +project_source_root = meson.project_source_root() +project_build_root = meson.project_build_root() + prefixdir = get_option('prefix') sysconfdir = get_option('sysconfdir') bindir = prefixdir / get_option('bindir') @@ -191,8 +197,7 @@ foreach tuple : _customdirs customdir = def_path else if not customdir.startswith('/') - error('User provided @0@, \'@1@\' is not an absolute path.' - .format(dir_option, customdir)) + error(f'User provided @dir_option@, \'@customdir@\' is not an absolute path.') endif # Strip all leading/trailing and re-add only the leading one. customdir = '/' / customdir.strip('/') @@ -224,10 +229,8 @@ foreach tuple : _completiondirs if completion.found() completion_prefix = completion.get_variable(pkgconfig : 'prefix') if completion_prefix != prefixdir - warning('User provided prefix \'@0@\' differs from @1@ one \'@2@\'.' - .format(prefixdir, pkg_dep, completion_prefix)) - warning('Not installing completion. To re-enable, manually set @0@.' - .format(dir_option)) + warning(f'User provided prefix \'@prefixdir@\' differs from @pkg_dep@ one \'@completion_prefix@\'.') + warning(f'Not installing completion. To re-enable, manually set @dir_option@.') completiondir = 'no' else completiondir = completion.get_variable(pkgconfig : 'completionsdir') @@ -279,7 +282,7 @@ foreach tuple : _compression dlopen = dlopen_all or get_option('dlopen').contains(opt) if not dlopen_all and dlopen and get_option(opt).disabled() - error('Incompatiable options: dlopen=@0@ for disabled @0@'.format(opt)) + error(f'Incompatiable options: dlopen=@opt@ for disabled @opt@') endif dep = dependency(pkg_dep, version : pkg_dep_version, required : get_option(opt)) @@ -292,7 +295,7 @@ foreach tuple : _compression cdata.set10('ENABLE_' + opt.to_upper() + '_DLOPEN', have and dlopen) if have - module_compressions += '@0@ '.format(opt) + module_compressions += f'@opt@ ' endif features += ['@0@@1@'.format(have ? '+' : '-', opt.to_upper())] @@ -447,7 +450,6 @@ kmod = executable( kmod_sources, link_with : [libshared, libkmod_internal], gnu_symbol_visibility : 'hidden', - build_by_default : get_option('tools'), install : get_option('tools'), ) diff --git a/scripts/build-scdoc.sh b/scripts/build-scdoc.sh index 66aa673d..72fdee27 100755 --- a/scripts/build-scdoc.sh +++ b/scripts/build-scdoc.sh @@ -3,7 +3,9 @@ set -euo pipefail SCDOC=$1 -INPUT=$2 -SED_PATTERN=$3 +shift +SED_PATTERN=$1 +shift +INPUT=$* -cat $INPUT | sed -e $SED_PATTERN | $SCDOC +sed -e $SED_PATTERN $INPUT | $SCDOC diff --git a/shared/.gitignore b/shared/.gitignore deleted file mode 100644 index 088ef797..00000000 --- a/shared/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.dirstamp -.deps/ -.libs/ -*.la -*.lo diff --git a/testsuite/.gitignore b/testsuite/.gitignore deleted file mode 100644 index f0289d47..00000000 --- a/testsuite/.gitignore +++ /dev/null @@ -1,54 +0,0 @@ -*.lo -*.la -*.so -/.dirstamp -/test-strbuf -/test-array -/test-util -/test-blacklist -/test-dependencies -/test-depmod -/test-init -/test-initstate -/test-loaded -/test-modinfo -/test-new-module -/test-testsuite -/test-modprobe -/test-hash -/test-list -/test-weakdep -/rootfs -/stamp-rootfs -/test-strbuf.log -/test-strbuf.trs -/test-array.log -/test-array.trs -/test-util.log -/test-util.trs -/test-blacklist.log -/test-blacklist.trs -/test-dependencies.log -/test-dependencies.trs -/test-depmod.log -/test-depmod.trs -/test-init.log -/test-init.trs -/test-initstate.log -/test-initstate.trs -/test-loaded.log -/test-loaded.trs -/test-modinfo.log -/test-modinfo.trs -/test-modprobe.log -/test-modprobe.trs -/test-hash.log -/test-hash.trs -/test-new-module.log -/test-new-module.trs -/test-testsuite.log -/test-testsuite.trs -/test-list.log -/test-list.trs -/test-weakdep.log -/test-weakdep.trs diff --git a/testsuite/meson.build b/testsuite/meson.build index b4810aed..0cb0ca37 100644 --- a/testsuite/meson.build +++ b/testsuite/meson.build @@ -6,7 +6,7 @@ build_module_playground = custom_target( 'build-module-playground', command : [ setup_modules, - meson.project_source_root(), + project_source_root, 'testsuite/module-playground', # do not prepend source/build root ], # The command ensures we don't do extra work, so the missing output token file @@ -21,10 +21,10 @@ create_rootfs = custom_target( 'create-rootfs', command : [ setup_rootfs, - meson.project_source_root() / 'testsuite/rootfs-pristine', - meson.project_build_root() / 'testsuite/rootfs', - meson.project_build_root() / 'testsuite/module-playground', - meson.project_build_root() / 'config.h', + f'@project_source_root@/testsuite/rootfs-pristine', + f'@project_build_root@/testsuite/rootfs', + f'@project_build_root@/testsuite/module-playground', + f'@project_build_root@/config.h', sysconfdir, moduledir, ], @@ -48,9 +48,9 @@ test_override_mods = [] foreach mod : _test_override_mods test_override_mods += shared_module( mod, - files('@0@.c'.format(mod)), + files(f'@mod@.c'), include_directories : top_include, - c_args : '-DABS_TOP_BUILDDIR="@0@"'.format(meson.project_build_root()), + c_args : f'-DABS_TOP_BUILDDIR="@project_build_root@"', dependencies : libdl, link_with : [libshared, libkmod_internal], gnu_symbol_visibility : 'hidden', @@ -62,9 +62,9 @@ endforeach testsuite_c_args = [ '-UNDEBUG', - '-DTESTSUITE_ROOTFS="@0@/testsuite/rootfs/"'.format(meson.project_build_root()), - '-DTOOLS_DIR="@0@/"'.format(meson.project_build_root()), - '-DOVERRIDE_LIBDIR="@0@/testsuite/"'.format(meson.project_build_root()), + f'-DTESTSUITE_ROOTFS="@project_build_root@/testsuite/rootfs/"', + f'-DTOOLS_DIR="@project_build_root@/"', + f'-DOVERRIDE_LIBDIR="@project_build_root@/testsuite/"', ] libtestsuite = static_library( @@ -107,7 +107,7 @@ endif foreach input : _testsuite exec = executable( input, - files('@0@.c'.format(input)), + files(f'@input@.c'), include_directories : top_include, c_args : testsuite_c_args, link_with : [libshared, libkmod_internal, libtestsuite], diff --git a/testsuite/module-playground/.gitignore b/testsuite/module-playground/.gitignore deleted file mode 100644 index e4d99cf7..00000000 --- a/testsuite/module-playground/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -*.ko -.cache.mk -*.mod.c -.tmp_versions -*.mod -*.a -*.cmd -*.o.d - -modules.order -Module.symvers diff --git a/testsuite/rootfs-pristine/test-loaded/sys/module/btusb/holders/.gitignore b/testsuite/rootfs-pristine/test-loaded/sys/module/btusb/holders/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/testsuite/rootfs-pristine/test-rootfs/testdir/.gitignore b/testsuite/rootfs-pristine/test-rootfs/testdir/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/tools/.gitignore b/tools/.gitignore deleted file mode 100644 index 3e341600..00000000 --- a/tools/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -/.dirstamp -/depmod -/insmod -/kmod -/kmod-depmod -/kmod-insmod -/kmod-lsmod -/kmod-modinfo -/kmod-modprobe -/kmod-rmmod -/lsmod -/modinfo -/modprobe -/rmmod -/test diff --git a/tools/rmmod.c b/tools/rmmod.c index 61f2e008..62c07894 100644 --- a/tools/rmmod.c +++ b/tools/rmmod.c @@ -36,7 +36,7 @@ static const struct option cmdopts[] = { static void help(void) { printf("Usage:\n" - "\t%s [options] [list of modulenames]\n" + "\t%s [options] modulenames\n" "Options:\n" "\t-f, --force DANGEROUS: forces a module unload and may\n" "\t crash your machine\n"