Print this page
1154 cpio needs a quiet option

*** 19,28 **** --- 19,29 ---- * CDDL HEADER END */ /* * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2012 Milan Jurik. All rights reserved. + * Copyright (c) 2012 Gary Mills */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */
*** 823,834 **** } if (Archive > 0) { if (close(Archive) != 0) msg(EXTN, "close error"); } ! Blocks = (u_longlong_t)(Blocks * Bufsize + SBlocks + 0x1FF) >> 9; msg(EPOST, "%lld blocks", Blocks); if (Error_cnt) msg(EPOST, "%d error(s)", Error_cnt); return (EXIT_CODE); } --- 824,838 ---- } if (Archive > 0) { if (close(Archive) != 0) msg(EXTN, "close error"); } ! if ((Args & OCq) == 0) { ! Blocks = (u_longlong_t)(Blocks * Bufsize + SBlocks + ! 0x1FF) >> 9; msg(EPOST, "%lld blocks", Blocks); + } if (Error_cnt) msg(EPOST, "%d error(s)", Error_cnt); return (EXIT_CODE); }
*** 6377,6404 **** extern char *optarg; #if defined(O_XATTR) #if defined(_PC_SATTR_ENABLED) #ifdef WAITAROUND ! char *opts_p = "zabcdfiklmoprstuvABC:DE:H:I:LM:O:PR:SV6@/"; #else ! char *opts_p = "abcdfiklmoprstuvABC:DE:H:I:LM:O:PR:SV6@/"; #endif /* WAITAROUND */ #else /* _PC_SATTR_ENABLED */ #ifdef WAITAROUND ! char *opts_p = "zabcdfiklmoprstuvABC:DE:H:I:LM:O:PR:SV6@"; #else ! char *opts_p = "abcdfiklmoprstuvABC:DE:H:I:LM:O:PR:SV6@"; #endif /* WAITAROUND */ #endif /* _PC_SATTR_ENABLED */ #else /* O_XATTR */ #ifdef WAITAROUND ! char *opts_p = "zabcdfiklmoprstuvABC:DE:H:I:LM:O:PR:SV6"; #else ! char *opts_p = "abcdfiklmoprstuvABC:DE:H:I:LM:O:PR:SV6"; #endif /* WAITAROUND */ #endif /* O_XATTR */ char *dupl_p = "Only one occurrence of -%c allowed"; int option; --- 6381,6408 ---- extern char *optarg; #if defined(O_XATTR) #if defined(_PC_SATTR_ENABLED) #ifdef WAITAROUND ! char *opts_p = "zabcdfiklmopqrstuvABC:DE:H:I:LM:O:PR:SV6@/"; #else ! char *opts_p = "abcdfiklmopqrstuvABC:DE:H:I:LM:O:PR:SV6@/"; #endif /* WAITAROUND */ #else /* _PC_SATTR_ENABLED */ #ifdef WAITAROUND ! char *opts_p = "zabcdfiklmopqrstuvABC:DE:H:I:LM:O:PR:SV6@"; #else ! char *opts_p = "abcdfiklmopqrstuvABC:DE:H:I:LM:O:PR:SV6@"; #endif /* WAITAROUND */ #endif /* _PC_SATTR_ENABLED */ #else /* O_XATTR */ #ifdef WAITAROUND ! char *opts_p = "zabcdfiklmopqrstuvABC:DE:H:I:LM:O:PR:SV6"; #else ! char *opts_p = "abcdfiklmopqrstuvABC:DE:H:I:LM:O:PR:SV6"; #endif /* WAITAROUND */ #endif /* O_XATTR */ char *dupl_p = "Only one occurrence of -%c allowed"; int option;
*** 6466,6475 **** --- 6470,6482 ---- break; case 'p': /* "pass" */ Max_namesz = APATH; Args |= OCp; break; + case 'q': /* "quiet" */ + Args |= OCq; + break; case 'r': /* rename files interactively */ Args |= OCr; break; case 's': /* swap bytes */ Args |= OCs;
*** 6865,6883 **** { (void) fflush(stdout); #if defined(O_XATTR) (void) fprintf(stderr, gettext("USAGE:\n" ! "\tcpio -i[bcdfkmrstuv@BSV6] [-C size] " "[-E file] [-H hdr] [-I file [-M msg]] " "[-R id] [patterns]\n" "\tcpio -o[acv@ABLV] [-C size] " "[-H hdr] [-O file [-M msg]]\n" "\tcpio -p[adlmuv@LV] [-R id] directory\n")); #else (void) fprintf(stderr, gettext("USAGE:\n" ! "\tcpio -i[bcdfkmrstuvBSV6] [-C size] " "[-E file] [-H hdr] [-I file [-M msg]] " "[-R id] [patterns]\n" "\tcpio -o[acvABLV] [-C size] " "[-H hdr] [-O file [-M msg]]\n" "\tcpio -p[adlmuvLV] [-R id] directory\n")); --- 6872,6890 ---- { (void) fflush(stdout); #if defined(O_XATTR) (void) fprintf(stderr, gettext("USAGE:\n" ! "\tcpio -i[bcdfkmqrstuv@BSV6] [-C size] " "[-E file] [-H hdr] [-I file [-M msg]] " "[-R id] [patterns]\n" "\tcpio -o[acv@ABLV] [-C size] " "[-H hdr] [-O file [-M msg]]\n" "\tcpio -p[adlmuv@LV] [-R id] directory\n")); #else (void) fprintf(stderr, gettext("USAGE:\n" ! "\tcpio -i[bcdfkmqrstuvBSV6] [-C size] " "[-E file] [-H hdr] [-I file [-M msg]] " "[-R id] [patterns]\n" "\tcpio -o[acvABLV] [-C size] " "[-H hdr] [-O file [-M msg]]\n" "\tcpio -p[adlmuvLV] [-R id] directory\n"));