summaryrefslogtreecommitdiffstats
path: root/sys-utils
diff options
context:
space:
mode:
authorKarel Zak2012-06-15 12:44:17 +0200
committerKarel Zak2012-06-15 12:44:17 +0200
commitd5f9b6e5fb352c632655e442773df96129cea02d (patch)
treea260ed26fd77e54280d1370f0b8e7a41aa1fe380 /sys-utils
parentlibmount: make some string operations more robust (diff)
parentlsblk: use blkdev_scsi_type_to_name() (diff)
downloadkernel-qcow2-util-linux-d5f9b6e5fb352c632655e442773df96129cea02d.tar.gz
kernel-qcow2-util-linux-d5f9b6e5fb352c632655e442773df96129cea02d.tar.xz
kernel-qcow2-util-linux-d5f9b6e5fb352c632655e442773df96129cea02d.zip
Merge branch '2012wk23' of git://github.com/kerolasa/lelux-utiliteetit
* '2012wk23' of git://github.com/kerolasa/lelux-utiliteetit: lsblk: use blkdev_scsi_type_to_name() blkdev: add blkdev_scsi_type_to_name() wipefs: use symbolic value for markup mode eject: inform if CD-ROM drive is not ready docs: clean up partx.8 manual include: fix void pointer arithmetics warnings sysfs: fix printf format warnings build: fix unused parameter warnings build: fix redundant redeclaration warnings include: fix spurious list.h warnings uuidd: use output redirection which works [checkbashisms] blkid: fix realloc memory leak [cppcheck] setarch: do not use -1 as array index [cppcheck]
Diffstat (limited to 'sys-utils')
-rw-r--r--sys-utils/eject.c8
-rw-r--r--sys-utils/setarch.c6
2 files changed, 11 insertions, 3 deletions
diff --git a/sys-utils/eject.c b/sys-utils/eject.c
index 096f37090..f621b062e 100644
--- a/sys-utils/eject.c
+++ b/sys-utils/eject.c
@@ -435,6 +435,14 @@ static void toggle_tray(int fd)
if (eject_cdrom(fd))
err(EXIT_FAILURE, _("CD-ROM eject command failed"));
return;
+ case CDS_NO_INFO:
+ warnx(_("no CD-ROM information available"));
+ return;
+ case CDS_DRIVE_NOT_READY:
+ warnx(_("CD-ROM drive is not ready"));
+ return;
+ default:
+ abort();
}
#endif
diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
index 97269f45a..a0c6ea81f 100644
--- a/sys-utils/setarch.c
+++ b/sys-utils/setarch.c
@@ -259,12 +259,12 @@ int main(int argc, char *argv[])
p = program_invocation_short_name;
if (!strcmp(p, "setarch")) {
- argv++;
argc--;
if (argc < 1)
show_usage(_("Not enough arguments"));
- p = argv[0];
- argv[0] = argv[-1]; /* for getopt_long() to get the program name */
+ p = argv[1];
+ argv[1] = argv[0]; /* for getopt_long() to get the program name */
+ argv++;
if (!strcmp(p, "-h") || !strcmp(p, "--help"))
show_help();
else if (!strcmp(p, "-V") || !strcmp(p, "--version"))