diff --git a/sane-backends-1.0.23-saned-help.patch b/sane-backends-1.0.23-saned-help.patch new file mode 100644 index 0000000..f24e599 --- /dev/null +++ b/sane-backends-1.0.23-saned-help.patch @@ -0,0 +1,68 @@ +From a1b77e545c9f5a12d4aba53efe9dfdf36b362083 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Mon, 8 Jul 2013 15:36:13 +0200 +Subject: [PATCH] patch: saned-help + +Squashed commit of the following: + +commit 06a8563916e974210aea9f1d356b142ef3c64bf9 +Author: Nils Philippsen +Date: Mon Jul 8 15:09:51 2013 +0200 + + Add short help message to saned + + (cherry picked from commit fab378a6817c5df72b3991d160d48a23f24a1111) + + Conflicts: + doc/saned.man +--- + doc/saned.man | 5 +++++ + frontend/saned.c | 9 +++++++++ + 2 files changed, 14 insertions(+) + +diff --git a/doc/saned.man b/doc/saned.man +index ad4f535..4f79510 100644 +--- a/doc/saned.man ++++ b/doc/saned.man +@@ -10,6 +10,7 @@ saned \- SANE network daemon + .I [ n ] + .B | \-s + .I [ n ] ++.B | \-h + .B ] + .SH DESCRIPTION + .B saned +@@ -61,6 +62,10 @@ requests using syslog. + If + .B saned + is run from inetd or xinetd, no option can be given. ++.PP ++The ++.B \-h ++flag displays a short help message. + .SH CONFIGURATION + First and foremost: + .B saned +diff --git a/frontend/saned.c b/frontend/saned.c +index 252b51e..f9787a0 100644 +--- a/frontend/saned.c ++++ b/frontend/saned.c +@@ -3254,6 +3254,15 @@ main (int argc, char *argv[]) + } + else if (strncmp (argv[1], "-s", 2) == 0) + run_mode = SANED_RUN_DEBUG; ++ else ++ { ++ printf ("Usage: saned [ -a [ username ] | -d [ n ] | -s [ n ] ] | -h\n"); ++ if ((strncmp (argv[1], "-h", 2) == 0) || ++ (strncmp (argv[1], "--help", 6) == 0)) ++ exit (EXIT_SUCCESS); ++ else ++ exit (EXIT_FAILURE); ++ } + } + + if (run_mode == SANED_RUN_DEBUG) +-- +1.8.3.1 + diff --git a/sane-backends.spec b/sane-backends.spec index 7dbfe35..26318d2 100644 --- a/sane-backends.spec +++ b/sane-backends.spec @@ -57,6 +57,9 @@ Patch6: sane-backends-1.0.23-coolscan-multiscan.patch # Describe missing flag "-b" in scanimage man page. # Upstream commit: 4fc171100db7c8258448cf9aaa11b6308e233b58 Patch7: sane-backends-1.0.23-scanimage-man.patch +# Add short help message to saned. +# Upstream commit: fab378a6817c5df72b3991d160d48a23f24a1111 +Patch8: sane-backends-1.0.23-saned-help.patch URL: http://www.sane-project.org @@ -166,6 +169,7 @@ This package contains backend drivers to access digital cameras through SANE. %patch5 -p1 -b .umax-init-error %patch6 -p1 -b .coolscan-multiscan %patch7 -p1 -b .scanimage-man +%patch8 -p1 -b .saned-help %build CFLAGS="%optflags -fno-strict-aliasing" @@ -275,6 +279,7 @@ popd %changelog * Mon Jul 08 2013 Nils Philippsen - describe missing flag "-b" in scanimage man page +- add short help message to saned * Tue Jun 25 2013 Nils Philippsen - 1.0.23-11 - move documentation into separate doc subpackage (#977653)