diff options
author | Jim Meyering <jim@meyering.net> | 2000-07-30 16:30:43 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-07-30 16:30:43 +0000 |
commit | ff6161442dbb211ac41c9c18d2d593de2ab85c48 (patch) | |
tree | 5d7383cc85dfe9356374f9510c417d75d9648f20 /src | |
parent | 7373e3149dc8037c382a85cc48167966d9ed5813 (diff) | |
download | coreutils-ff6161442dbb211ac41c9c18d2d593de2ab85c48.tar.xz |
Convert "`%s'" in format strings to "%s", and wrap each
corresponding argument in a `quote (...)' call.
Diffstat (limited to 'src')
-rw-r--r-- | src/mknod.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mknod.c b/src/mknod.c index c314a0187..d85355d7a 100644 --- a/src/mknod.c +++ b/src/mknod.c @@ -35,6 +35,7 @@ #include "system.h" #include "error.h" #include "modechange.h" +#include "quote.h" #include "xstrtol.h" /* The official name of this program (e.g., no `g' prefix). */ @@ -160,17 +161,17 @@ numbers must be specified")); s = argv[optind + 2]; if (xstrtol (s, NULL, 0, &tmp_major, NULL) != LONGINT_OK) - error (1, 0, _("invalid major device number `%s'"), s); + error (1, 0, _("invalid major device number %s"), quote (s)); s = argv[optind + 3]; if (xstrtol (s, NULL, 0, &tmp_minor, NULL) != LONGINT_OK) - error (1, 0, _("invalid minor device number `%s'"), s); + error (1, 0, _("invalid minor device number %s"), quote (s)); i_major = (int) tmp_major; i_minor = (int) tmp_minor; if (mknod (argv[optind], newmode | S_IFBLK, makedev (i_major, i_minor))) - error (1, errno, "%s", argv[optind]); + error (1, errno, "%s", quote (argv[optind])); #endif break; @@ -189,17 +190,17 @@ numbers must be specified")); s = argv[optind + 2]; if (xstrtol (s, NULL, 0, &tmp_major, NULL) != LONGINT_OK) - error (1, 0, _("invalid major device number `%s'"), s); + error (1, 0, _("invalid major device number %s"), quote (s)); s = argv[optind + 3]; if (xstrtol (s, NULL, 0, &tmp_minor, NULL) != LONGINT_OK) - error (1, 0, _("invalid minor device number `%s'"), s); + error (1, 0, _("invalid minor device number %s"), quote (s)); i_major = (int) tmp_major; i_minor = (int) tmp_minor; if (mknod (argv[optind], newmode | S_IFCHR, makedev (i_major, i_minor))) - error (1, errno, "%s", argv[optind]); + error (1, errno, "%s", quote (argv[optind])); #endif break; @@ -214,7 +215,7 @@ major and minor device numbers may not be specified for fifo files")); usage (1); } if (mkfifo (argv[optind], newmode)) - error (1, errno, "%s", argv[optind]); + error (1, errno, "%s", quote (argv[optind])); #endif break; |