chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
store devpath with the usual leading slash
[elogind.git]
/
udevinfo.c
diff --git
a/udevinfo.c
b/udevinfo.c
index 0551eb2e3287ae1cf2efbe6c4d8d29687f805611..3f47add87cd6f7197ec2d81dc5603bbf56564d3a 100644
(file)
--- a/
udevinfo.c
+++ b/
udevinfo.c
@@
-190,7
+190,7
@@
int main(int argc, char *argv[], char *envp[])
{ "attribute-walk", 0, NULL, 'a' },
{ "export-db", 0, NULL, 'e' },
{ "root", 0, NULL, 'r' },
{ "attribute-walk", 0, NULL, 'a' },
{ "export-db", 0, NULL, 'e' },
{ "root", 0, NULL, 'r' },
- { "version", 0, NULL,
'V' },
+ { "version", 0, NULL,
1 }, /* -V outputs braindead format */
{ "help", 0, NULL, 'h' },
{}
};
{ "help", 0, NULL, 'h' },
{}
};
@@
-290,6
+290,9
@@
int main(int argc, char *argv[], char *envp[])
case 'e':
export_db(export_record);
goto exit;
case 'e':
export_db(export_record);
goto exit;
+ case 1:
+ printf("%s\n", UDEV_VERSION);
+ goto exit;
case 'V':
printf("udevinfo, version %s\n", UDEV_VERSION);
goto exit;
case 'V':
printf("udevinfo, version %s\n", UDEV_VERSION);
goto exit;
@@
-308,7
+311,6
@@
int main(int argc, char *argv[], char *envp[])
" --root prepend to query result or print udev_root\n"
" --attribute-walk print all SYSFS_attributes along the device chain\n"
" --export-db export the content of the udev database\n"
" --root prepend to query result or print udev_root\n"
" --attribute-walk print all SYSFS_attributes along the device chain\n"
" --export-db export the content of the udev database\n"
- " --version print udev version\n"
" --help print this text\n"
"\n");
goto exit;
" --help print this text\n"
"\n");
goto exit;