mdev: make usage text more useful

function                                             old     new   delta
packed_usage                                       26235   26291     +56
This commit is contained in:
Denis Vlasenko 2009-04-13 13:33:02 +00:00
parent e8a796828e
commit aafbae6181
2 changed files with 25 additions and 19 deletions

View File

@ -2556,8 +2556,14 @@
#define mdev_full_usage "\n\n" \
" -s Scan /sys and populate /dev during system boot\n" \
"\n" \
"Called with no options (via hotplug) it uses environment variables\n" \
"to determine which device to add/remove."
"It can be run by kernel as a hotplug helper. To activate it:\n" \
" echo /bin/mdev >/proc/sys/kernel/hotplug\n" \
USE_FEATURE_MDEV_CONF( \
"It uses /etc/mdev.conf with lines\n" \
"DEVNAME UID:GID PERM" \
USE_FEATURE_MDEV_RENAME(" [>|=PATH]") \
USE_FEATURE_MDEV_EXEC(" [@|$|*COMMAND]") \
) \
#define mdev_notes_usage "" \
USE_FEATURE_MDEV_CONFIG( \

View File

@ -62,13 +62,13 @@ static void make_device(char *path, int delete)
struct bb_uidgid_t ugid = { 0, 0 };
parser_t *parser;
char *tokens[5];
#endif
# if ENABLE_FEATURE_MDEV_EXEC
char *command = NULL;
# endif
# if ENABLE_FEATURE_MDEV_RENAME
char *alias = NULL;
char aliaslink = aliaslink; /* for compiler */
# endif
#endif
char *dev_maj_min = path + strlen(path);
@ -406,7 +406,7 @@ int mdev_main(int argc UNUSED_PARAM, char **argv)
xchdir("/dev");
if (argv[1] && !strcmp(argv[1], "-s")) {
if (argv[1] && strcmp(argv[1], "-s") == 0) {
/* Scan:
* mdev -s
*/
@ -501,5 +501,5 @@ int mdev_main(int argc UNUSED_PARAM, char **argv)
if (ENABLE_FEATURE_CLEAN_UP)
RELEASE_CONFIG_BUFFER(temp);
return 0;
return EXIT_SUCCESS;
}