setcifsacl: remove syslog goop
Subsystems (2)
PATCH 1/1 setcifsacl: remove syslog goop
setcifsacl doesn't use syslog, so no need to open a channel to it.
Signed-off-by Jeff Layton <[email protected]>
--- setcifsacl.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)
setcifsacl.c +4 -11
@@ -26,7 +26,6 @@#include <string.h> #include <getopt.h> -#include <syslog.h> #include <stdint.h> #include <stdbool.h> #include <unistd.h>
@@ -39,8 +38,6 @@#include <sys/xattr.h> #include "cifsacl.h" -static const char *prog; -enum setcifsacl_actions { ActUnknown =-1 , ActDelete,
@@ -732,7 +729,7 @@ setacl_action(struct cifs_ntsd *pntsd, struct cifs_ntsd **npntsd, }static void -setcifsacl_usage (void ) +setcifsacl_usage (const char *prog) { fprintf(stderr, "%s: Alter CIFS/NTFS ACL in a security descriptor of a file object\n",
@@ -771,10 +768,6 @@ main(const int argc, char *const argv[])struct cifs_ace **cacesptr =NULL , **facesptr =NULL ;struct cifs_ntsd *ntsdptr =NULL ; - prog =basename (argv[0 ]); - -openlog (prog,0 ,LOG_DAEMON ); - c =getopt (argc, argv,"hvD:M:a:S:" );switch (c) {case 'D' :
@@ -794,19 +787,19 @@ main(const int argc, char *const argv[]) ace_list = optarg;break ;case 'h' : -setcifsacl_usage (); +setcifsacl_usage (basename (argv[0 ]));return 0 ;case 'v' :printf ("Version: %s\n" ,VERSION );return 0 ;default : -setcifsacl_usage (); +setcifsacl_usage (basename (argv[0 ]));return -1 ; }/* We expect 1 argument in addition to the option */ if (argc !=4 ) { -setcifsacl_usage (); +setcifsacl_usage (basename (argv[0 ]));return -1 ; } filename = argv[3 ];
Signature · 1 line
1.7.11.7
A message that is not in the archive (sent off-list or not yet received): 1355409355-9565-1-git-send-email-jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org
Quoted 61 lines · On Thu, 13 Dec 2012 09:35:55 -0500 Jeff Layton…
setcifsacl doesn't use syslog, so no need to open a channel to it.
Signed-off-by Jeff Layton <[email protected]>--- setcifsacl.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)setcifsacl.c +3
-10@@ -26,7 +26,6 @@#include <string.h> #include <getopt.h> -#include <syslog.h> #include <stdint.h> #include <stdbool.h> #include <unistd.h> @@ -39,8 +38,6 @@#include <sys/xattr.h> #include "cifsacl.h" -static const char *prog; -enum setcifsacl_actions { ActUnknown =-1 , ActDelete,@@ -732,7 +729,7 @@ setacl_action(struct cifs_ntsd *pntsd, struct cifs_ntsd **npntsd, }static void -setcifsacl_usage (void ) +setcifsacl_usage (const char *prog) { fprintf(stderr, "%s: Alter CIFS/NTFS ACL in a security descriptor of a file object\n",@@ -771,10 +768,6 @@ main(const int argc, char *const argv[])struct cifs_ace **cacesptr =NULL , **facesptr =NULL ;struct cifs_ntsd *ntsdptr =NULL ; - prog =basename (argv[0 ]); - -openlog (prog,0 ,LOG_DAEMON ); - c =getopt (argc, argv,"hvD:M:a:S:" );switch (c) {case 'D' :@@ -794,19 +787,19 @@ main(const int argc, char *const argv[]) ace_list = optarg;break ;case 'h' : -setcifsacl_usage (); +setcifsacl_usage (basename (argv[0 ]));return 0 ;case 'v' :printf ("Version: %s\n" ,VERSION );return 0 ;default : -setcifsacl_usage (); +setcifsacl_usage (basename (argv[0 ]));
setcifsacl.c main(const int argc, char *const argv[]) · line 805
Quoted 10 lines
setcifsacl.c +1
-1return -1 ; }/* We expect 1 argument in addition to the option */ if (argc !=4 ) { -setcifsacl_usage (); +setcifsacl_usage (basename (argv[0 ]));return -1 ; } filename = argv[3 ];
Merged...
Signature · 1 line
Jeff Layton <[email protected]>