@@ -79,6 +79,7 @@ static __inline__ void platform_getoptreset(void)
{
extern int optreset;
optreset = 0;
+ opterr = 1;
}
static __inline__ int platform_uuid_compare(uuid_t *uu1, uuid_t *uu2)
@@ -83,6 +83,7 @@ static __inline__ void platform_getoptreset(void)
{
extern int optind;
optind = 0;
+ opterr = 1;
}
static __inline__ int platform_uuid_compare(uuid_t *uu1, uuid_t *uu2)
@@ -88,6 +88,7 @@ static __inline__ void platform_getoptreset(void)
{
extern int optind;
optind = 0;
+ opterr = 1;
}
static __inline__ int platform_uuid_compare(uuid_t *uu1, uuid_t *uu2)
Setting opterr = 0 is useful if you want to only parse a subset of paremeters first. Later you will have to set opterr = 1 again, but we already have a platform_getoptreset() and its expected to be used in these contexts so just sprinkle it there. Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org> --- include/darwin.h | 1 + include/gnukfreebsd.h | 1 + include/linux.h | 1 + 3 files changed, 3 insertions(+)