use new interface of the list2... functions
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sun, 7 Mar 2004 19:41:25 +0000 (19:41 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sun, 7 Mar 2004 19:41:25 +0000 (19:41 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1142 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/src/chcontext.c
util-vserver/src/reducecap.c

index c4a36e9..06adb99 100644 (file)
@@ -202,14 +202,13 @@ setCap(char const *str, uint32_t *add_caps, uint32_t *remove_caps)
 static inline void
 setFlags(char const *str, uint32_t *flags)
 {
-  char const           *err_ptr;
-  size_t               err_len;
+  struct vc_err_listparser     err;
   
-  *flags = vc_list2flag_compat(str, 0, &err_ptr, &err_len);
+  *flags = vc_list2flag_compat(str, 0, &err);
 
-  if (err_ptr!=0) {
+  if (err.ptr!=0) {
     WRITE_MSG(2, "Unknown flag '");
-    write(2, err_ptr, err_len);
+    write(2, err.ptr, err.len);
     WRITE_MSG(2, "'\n");
     exit(wrapper_exit_code);
   }
index bf56eb9..324eb5b 100644 (file)
@@ -252,13 +252,12 @@ int main (int argc, char *argv[])
       case CMD_PID             :  pid     = atoi(optarg);   break;
       case CMD_CAP             :  remove  = getCap(optarg); break;
       case CMD_FLAG            : {
-       char const      *err_ptr;
-       size_t          err_len;
+       struct vc_err_listparser        err;
        
-       flags = vc_list2flag_compat(optarg, 0, &err_ptr, &err_len);
-       if (err_ptr!=0) {
+       flags = vc_list2flag_compat(optarg, 0, &err);
+       if (err.ptr!=0) {
          WRITE_MSG(2, "Unknown flag '");
-         write(2, err_ptr, err_len);
+         write(2, err.ptr, err.len);
          WRITE_MSG(2, "'\n");
          exit(wrapper_exit_code);
        }