Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37752479
en ru br
ALT Linux repos
5.0: 1.9-alt3
4.1: 1.9-alt3
4.0: 1.9-alt2

Group :: System/Kernel and hardware
RPM: vlan-utils

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: vlan-1.9-deb-error-codes.patch
Download


--- vlan-1.9.orig/vconfig.c
+++ vlan-1.9/vconfig.c
@@ -132,7 +132,7 @@
          }
          else {
             // MATHIEU
-            //cerr << "Invalid name type.\n";
+                    //cerr << "Invalid name type.\n";
             fprintf(stderr,"Invalid name type.\n");
                                  
             show_usage();
@@ -144,9 +144,10 @@
          if_name = argv[2];
          if (strlen(if_name) > 15) {
             // MATHIEU
-            //cerr << "ERROR:  if_name must be 15 characters or less." << endl;
-            fprintf(stderr,"ERROR:  if_name must be 15 characters or less.\n");            
-            exit(1);
+                //cerr << "ERROR:  if_name must be 15 characters or less." << endl;
+            fprintf(stderr,"ERROR:  if_name must be 15 characters or less.\n");
+                        
+                        exit(1);
          }
          strcpy(if_request.device1, if_name);
       }
@@ -186,8 +187,7 @@
       if_request.cmd = ADD_VLAN_CMD;
       if (ioctl(fd, SIOCSIFVLAN, &if_request) < 0) {
          fprintf(stderr,"ERROR: trying to add VLAN #%u to IF -:%s:-  error: %s\n",
-                    vid, if_name, strerror(errno));
-         exit(3);
+                    vid, if_name, strerror(errno));                 
       }
       else {
          fprintf(stdout,"Added VLAN with VID == %u to IF -:%s:-\n",
@@ -201,8 +201,7 @@
       if_request.cmd = DEL_VLAN_CMD;
       if (ioctl(fd, SIOCSIFVLAN, &if_request) < 0) {
          fprintf(stderr,"ERROR: trying to remove VLAN -:%s:- error: %s\n",
-                 if_name, strerror(errno));
-         exit(4);
+                 if_name, strerror(errno));         
       }
       else {
          fprintf(stdout,"Removed VLAN -:%s:-\n", if_name);
@@ -212,8 +211,7 @@
       if_request.cmd = SET_VLAN_EGRESS_PRIORITY_CMD;
       if (ioctl(fd, SIOCSIFVLAN, &if_request) < 0) {
          fprintf(stderr,"ERROR: trying to set egress map on device -:%s:- error: %s\n",
-                 if_name, strerror(errno));
-         exit(5);
+                 if_name, strerror(errno));         
       }
       else {
          fprintf(stdout,"Set egress mapping on device -:%s:- "
@@ -226,7 +224,6 @@
       if (ioctl(fd, SIOCSIFVLAN, &if_request) < 0) {
          fprintf(stderr,"ERROR: trying to set ingress map on device -:%s:- error: %s\n",
                  if_name, strerror(errno));
-         exit(6);
       }
       else {
          fprintf(stdout,"Set ingress mapping on device -:%s:- "
@@ -239,7 +236,6 @@
       if (ioctl(fd, SIOCSIFVLAN, &if_request) < 0) {
          fprintf(stderr,"ERROR: trying to set flag on device -:%s:- error: %s\n",
                  if_name, strerror(errno));
-         exit(7);
       }
       else {
          fprintf(stdout,"Set flag on device -:%s:- "
@@ -251,8 +247,7 @@
       if_request.cmd = SET_VLAN_NAME_TYPE_CMD;
       if (ioctl(fd, SIOCSIFVLAN, &if_request) < 0) {
          fprintf(stderr,"ERROR: trying to set name type for VLAN subsystem, error: %s\n",
-                 strerror(errno));
-         exit(8);
+                 strerror(errno));         
       }
       else {
          fprintf(stdout,"Set name-type for VLAN subsystem."
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin