Whamcloud - gitweb
Add support for on-line resizing to resize2fs
[tools/e2fsprogs.git] / lib / ss / list_rqs.c
index 8c797ad..770f5f0 100644 (file)
@@ -1,9 +1,15 @@
 /*
  * Copyright 1987, 1988 by MIT Student Information Processing Board
  *
- * For copyright information, see copyright.h.
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission.  M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose.  It is provided "as is" without
+ * express or implied warranty.
  */
-#include "copyright.h"
 #include "ss_internal.h"
 #include <signal.h>
 #include <setjmp.h>
 
 typedef void sigret_t;
 
-#ifdef lint     /* "lint returns a value which is sometimes ignored" */
-#define DONT_USE(x)     x=x;
-#else /* !lint */
-#define DONT_USE(x)     ;
-#endif /* lint */
-
 static char const twentyfive_spaces[26] =
     "                         ";
 static char const NL[2] = "\n";
 
-void ss_list_requests(argc, argv, sci_idx, info_ptr)
-    int argc;
-    char **argv;
-    int sci_idx;
-    pointer info_ptr;
+void ss_list_requests(int argc __SS_ATTR((unused)),
+                     const char * const *argv __SS_ATTR((unused)),
+                     int sci_idx, void *infop __SS_ATTR((unused)))
 {
-    register ss_request_entry *entry;
-    register char const * const *name;
-    register int spacing;
-    register ss_request_table **table;
+    ss_request_entry *entry;
+    char const * const *name;
+    int spacing;
+    ss_request_table **table;
 
     char buffer[BUFSIZ];
     FILE *output;
     int fd;
-#ifdef POSIX_SIGNALS
     sigset_t omask, igmask;
-#else
-    int mask;
-#endif
-    sigret_t (*func)();
+    sigret_t (*func)(int);
 #ifndef NO_FORK
-#ifndef WAIT_USES_INT
-    union wait waitb;
-#else
     int waitb;
 #endif
-#endif
 
-    DONT_USE(argc);
-    DONT_USE(argv);
-
-#ifdef POSIX_SIGNALS
     sigemptyset(&igmask);
     sigaddset(&igmask, SIGINT);
     sigprocmask(SIG_BLOCK, &igmask, &omask);
-#else
-    mask = sigblock(sigmask(SIGINT));
-#endif
     func = signal(SIGINT, SIG_IGN);
     fd = ss_pager_create();
     output = fdopen(fd, "w");
-#ifdef POSIX_SIGNALS
     sigprocmask(SIG_SETMASK, &omask, (sigset_t *) 0);
-#else
-    sigsetmask(mask);
-#endif
 
     fprintf (output, "Available %s requests:\n\n",
             ss_info (sci_idx) -> subsystem_name);
@@ -79,7 +58,7 @@ void ss_list_requests(argc, argv, sci_idx, info_ptr)
             if (entry->flags & SS_OPT_DONT_LIST)
                 continue;
             for (name = entry->command_names; *name; name++) {
-                register int len = strlen(*name);
+                int len = strlen(*name);
                 strncat(buffer, *name, len);
                 spacing += len + 2;
                 if (name[1]) {