X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fwarning.c;h=1cea3161466ffca04acda97b647b387304a9c452;hb=9df17e6005e7a333399e3dc21a7afec75565c767;hp=a9cbccb72e287bb3d9dd30bee76226835e5e692c;hpb=ac5288c1ac9b4d0721b3bc7271368c11c736248e;p=chaz%2Ftar
diff --git a/src/warning.c b/src/warning.c
index a9cbccb..1cea316 100644
--- a/src/warning.c
+++ b/src/warning.c
@@ -1,19 +1,21 @@
-/* This file is part of GNU tar.
+/* Warnings for GNU tar.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright 2009, 2012-2014 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 3, or (at your option) any later
- version.
+ This file is part of GNU tar.
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- Public License for more details.
+ GNU tar is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
- You should have received a copy of the GNU General Public License along
- with this program. If not, see . */
+ GNU tar is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see . */
#include
#include
@@ -41,6 +43,10 @@ static char const *const warning_args[] = {
"unknown-cast",
"unknown-keyword",
"xdev",
+ "decompress-program",
+ "existing-file",
+ "xattr-write",
+ "record-size",
NULL
};
@@ -64,7 +70,11 @@ static int warning_types[] = {
WARN_TIMESTAMP,
WARN_UNKNOWN_CAST,
WARN_UNKNOWN_KEYWORD,
- WARN_XDEV
+ WARN_XDEV,
+ WARN_DECOMPRESS_PROGRAM,
+ WARN_EXISTING_FILE,
+ WARN_XATTR_WRITE,
+ WARN_RECORD_SIZE
};
ARGMATCH_VERIFY (warning_args, warning_types);
@@ -76,7 +86,7 @@ set_warning_option (const char *arg)
{
int negate = 0;
int option;
-
+
if (strcmp (arg, "none") == 0)
{
warning_option = 0;
@@ -88,11 +98,10 @@ set_warning_option (const char *arg)
arg += 3;
}
- option = XARGMATCH ("--warning", arg,
+ option = XARGMATCH ("--warning", arg,
warning_args, warning_types);
if (negate)
warning_option &= ~option;
else
warning_option |= option;
}
-