mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
maint: adjust code to handle "error" syntax-check changes
* src/dd.c: Don't include no longer used error.h. Use quoteaf() rather than quote() to quote appropriate for the shell and to avoid the syntax-check failure, * src/stty.c: Use quoteaf() rather than quotef() to have more consistent quoting of the invalid arg.
This commit is contained in:
1 parent
b7c8eb0046
commit
d055228e34
2 files changed
+5
-6
No files matched your search
@@ -25,7 +25,6 @@
|
||||
#include "alignalloc.h"
|
||||
#include "close-stream.h"
|
||||
#include "die.h"
|
||||
#include "error.h"
|
||||
#include "fd-reopen.h"
|
||||
#include "gethrxtime.h"
|
||||
#include "human.h"
|
||||
@@ -1498,7 +1497,7 @@ scanargs (int argc, char *const *argv)
|
||||
|
||||
if (val == NULL)
|
||||
{
|
||||
diagnose (0, _("unrecognized operand %s"), quote (name));
|
||||
diagnose (0, _("unrecognized operand %s"), quoteaf (name));
|
||||
usage (EXIT_FAILURE);
|
||||
}
|
||||
val++;
|
||||
@@ -1576,7 +1575,7 @@ scanargs (int argc, char *const *argv)
|
||||
}
|
||||
else
|
||||
{
|
||||
diagnose (0, _("unrecognized operand %s"), quote (name));
|
||||
diagnose (0, _("unrecognized operand %s"), quoteaf (name));
|
||||
usage (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -1587,7 +1586,7 @@ scanargs (int argc, char *const *argv)
|
||||
|
||||
if (invalid != LONGINT_OK)
|
||||
die (EXIT_FAILURE, invalid == LONGINT_OVERFLOW ? EOVERFLOW : 0,
|
||||
"%s: %s", _("invalid number"), quote (val));
|
||||
"%s: %s", _("invalid number"), quoteaf (val));
|
||||
else if (converted_idx)
|
||||
*converted_idx = n;
|
||||
}
|
||||
|
||||
+2
-2
@@ -1732,13 +1732,13 @@ set_speed (enum speed_setting type, char const *arg, struct termios *mode)
|
||||
{
|
||||
last_ibaud = baud;
|
||||
if (cfsetispeed (mode, baud))
|
||||
die (EXIT_FAILURE, 0, "unsupported ispeed %s", quotef (arg));
|
||||
die (EXIT_FAILURE, 0, "unsupported ispeed %s", quoteaf (arg));
|
||||
}
|
||||
if (type == output_speed || type == both_speeds)
|
||||
{
|
||||
last_obaud = baud;
|
||||
if (cfsetospeed (mode, baud))
|
||||
die (EXIT_FAILURE, 0, "unsupported ospeed %s", quotef (arg));
|
||||
die (EXIT_FAILURE, 0, "unsupported ospeed %s", quoteaf (arg));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user