Change calls to error_msg.* and strerror to use perror_msg.*.
diff --git a/freeramdisk.c b/freeramdisk.c
index a568cc6..a2b17c6 100644
--- a/freeramdisk.c
+++ b/freeramdisk.c
@@ -43,10 +43,10 @@
}
if ((f = open(argv[1], O_RDWR)) == -1) {
- error_msg_and_die( "cannot open %s: %s\n", argv[1], strerror(errno));
+ perror_msg_and_die("cannot open %s", argv[1]);
}
if (ioctl(f, BLKFLSBUF) < 0) {
- error_msg_and_die( "failed ioctl on %s: %s\n", argv[1], strerror(errno));
+ perror_msg_and_die("failed ioctl on %s", argv[1]);
}
/* Don't bother closing. Exit does
* that, so we can save a few bytes */