Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37909003
en ru br
ALT Linux repositórios
S:2.1.5-alt4
5.0: 2.1.5-alt3
4.1: 2.1.5-alt3
4.0: 2.1.5-alt3
3.0: 2.1.0-alt1

Outros repositórios
Upstream:2.1.5

Group :: Sistema/Kernel e hardware
RPM: eject

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: eject-2.1.5-alt-usage-stdout.patch
Download


--- eject/eject.c~	2007-06-28 19:39:46 +0400
+++ eject/eject.c	2007-06-28 19:43:59 +0400
@@ -151,10 +151,10 @@ static const char *partitionDevice[] = {
 
 
 /* Display command usage on standard error and exit. */
-static void usage()
+static void usage(FILE *stream)
 {
 //    perror(_("%s: device is `%s'\n"));
-	fprintf(stderr,_(
+	fprintf(stream,_(
 "Eject version %s by Jeff Tranter (tranter@pobox.com)\n"
 "Usage:\n"
 "  eject -h				-- display command usage and exit\n"
@@ -185,7 +185,7 @@ static void usage()
 )
 , version);
 #ifdef GETOPTLONG
-	fprintf(stderr,_(
+	fprintf(stream,_(
 "Long options:\n"
 "  -h --help   -v --verbose      -d --default\n"
 "  -a --auto   -c --changerslot  -t --trayclose  -x --cdspeed\n"
@@ -209,7 +209,6 @@ static void usage()
 "If omitted, name defaults to `%s'.\n"
 "By default tries -r, -s, -f, and -q in order until success.\n"),
 			DEFAULTDEVICE);
-  exit(1);
 }
 
 
@@ -296,7 +295,7 @@ static void parse_args(int argc, char **
 			  f_option = 1;
 			  break;
 		  case 'h':
-			  usage();
+			  usage(stdout);
 			  exit(0);
 			  break;
 		  case 'm':
@@ -334,6 +333,7 @@ static void parse_args(int argc, char **
 			  exit(0);
 			  break;
 		  case '?':
+			  usage(stderr);
 			  exit(1);
 			  break;
 		}
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009