hurdextras-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

notice notice.c


From: Samuel Thibault
Subject: notice notice.c
Date: Mon, 08 Jul 2013 09:02:38 +0000

CVSROOT:        /cvsroot/hurdextras
Module name:    notice
Changes by:     Samuel Thibault <sthibaul>      13/07/08 09:02:38

Modified files:
        .              : notice.c 

Log message:
        2013-07-05  Cyril Roelandt  <address@hidden>
        
                * notice.c (parse_opt): Gracefully handle the errors using
                argp_error instead of error.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/notice/notice.c?cvsroot=hurdextras&r1=1.1&r2=1.2

Patches:
Index: notice.c
===================================================================
RCS file: /cvsroot/hurdextras/notice/notice.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- notice.c    13 Apr 2006 00:04:47 -0000      1.1
+++ notice.c    8 Jul 2013 09:02:38 -0000       1.2
@@ -137,14 +137,14 @@
        /* Open the file.  */
        file = file_name_lookup (arg, 0, 0);
        if (file == MACH_PORT_NULL)
-         error (1, errno, "Could not open %s", arg);
+         argp_error (state, arg);
 
        /* Create the notification port.  */
        err = ports_create_port (class, bucket,
                                 sizeof (struct notice_handle) + strlen (arg),
                                 &notice);
        if (err)
-         error (1, err, "Could not allocate port");
+         argp_error (state, "Could not allocate port");
        /* Record the file name and the changes we are interested in.  */
        strcpy (notice->name, arg);
        notice->changes = changes;
@@ -153,7 +153,7 @@
        err = file_notice_changes (file, ports_get_right (notice),
                                   MACH_MSG_TYPE_MAKE_SEND);
        if (err)
-         error (1, err, "Noticing changes not possible for %s", arg);
+         argp_error (state, arg);
        break;
       }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]