xserver/os utils.c,3.90,3.91 xdmcp.c,3.25,3.26

Harold L Hunt II xserver-commit at pdx.freedesktop.org
Wed Mar 17 17:34:22 PST 2004


Committed by: harold

Update of /cvs/xserver/xserver/os
In directory pdx:/tmp/cvs-serv32131/os

Modified Files:
	utils.c xdmcp.c 
Log Message:
Replace exit(1) calls in OS layer with FatalError calls.

Index: utils.c
===================================================================
RCS file: /cvs/xserver/xserver/os/utils.c,v
retrieving revision 3.90
retrieving revision 3.91
diff -u -d -r3.90 -r3.91
--- a/utils.c	4 Mar 2004 01:24:41 -0000	3.90
+++ b/utils.c	18 Mar 2004 01:34:19 -0000	3.91
@@ -623,7 +623,7 @@
             if( ! VerifyDisplayName( display ) ) {
                 ErrorF("Bad display name: %s\n", display);
                 UseMsg();
-                exit(1);
+                FatalError("Bad display name: %s\n", display);
             }
 	}
 	else if ( strcmp( argv[i], "-a") == 0)
@@ -981,7 +981,7 @@
  	{
 	    ErrorF("Unrecognized option: %s\n", argv[i]);
 	    UseMsg();
-	    exit (1);
+	    FatalError("Unrecognized option: %s\n", argv[i]);
         }
     }
 }

Index: xdmcp.c
===================================================================
RCS file: /cvs/xserver/xserver/os/xdmcp.c,v
retrieving revision 3.25
retrieving revision 3.26
diff -u -d -r3.25 -r3.26
--- a/xdmcp.c	30 Oct 2003 23:41:46 -0000	3.25
+++ b/xdmcp.c	18 Mar 2004 01:34:19 -0000	3.26
@@ -212,8 +212,7 @@
     }
     if (strcmp(argv[i], "-port") == 0) {
         if (++i == argc)  {
-	    ErrorF("Xserver: missing port number in command line\n");
-	    exit(1);
+	    FatalError("Xserver: missing port number in command line\n");
 	}
 	xdm_udp_port = atoi(argv[i]);
 	return (i + 1);
@@ -228,8 +227,7 @@
     }
     if (strcmp(argv[i], "-class") == 0) {
         if (++i == argc)  {
-	    ErrorF("Xserver: missing class name in command line\n");
-	    exit(1);
+	    FatalError("Xserver: missing class name in command line\n");
 	}
 	defaultDisplayClass = argv[i];
 	return (i + 1);
@@ -237,8 +235,7 @@
 #ifdef HASXDMAUTH
     if (strcmp(argv[i], "-cookie") == 0) {
         if (++i == argc)  {
-	    ErrorF("Xserver: missing cookie data in command line\n");
-	    exit(1);
+	    FatalError("Xserver: missing cookie data in command line\n");
 	}
 	xdmAuthCookie = argv[i];
 	return (i + 1);
@@ -246,8 +243,7 @@
 #endif
     if (strcmp(argv[i], "-displayID") == 0) {
         if (++i == argc)  {
-	    ErrorF("Xserver: missing displayID in command line\n");
-	    exit(1);
+	    FatalError("Xserver: missing displayID in command line\n");
 	}
 	XdmcpRegisterManufacturerDisplayID (argv[i], strlen (argv[i]));
 	return (i + 1);
@@ -919,8 +915,8 @@
     if (xdmcpSocket >= 0 && xdm_from != NULL) {
 	if (bind(xdmcpSocket, (struct sockaddr *)&FromAddress,
 		 sizeof(FromAddress)) < 0) {
-	    ErrorF("Xserver: failed to bind to -from address: %s\n", xdm_from);
-	    exit(1);
+	    FatalError("Xserver: failed to bind to -from address: %s\n",
+		       xdm_from);
 	}
     }
 #endif /* STREAMSCONN */
@@ -1273,13 +1269,11 @@
 
     if (i == argc)
     {
-	ErrorF("Xserver: missing host name in command line\n");
-	exit(1);
+	FatalError("Xserver: missing host name in command line\n");
     }
     if (!(hep = _XGethostbyname(argv[i], hparams)))
     {
-	ErrorF("Xserver: unknown host: %s\n", argv[i]);
-	exit(1);
+	FatalError("Xserver: unknown host: %s\n", argv[i]);
     }
     if (hep->h_length == sizeof (struct in_addr))
     {
@@ -1292,8 +1286,7 @@
     }
     else
     {
-	ErrorF ("Xserver: host on strange network %s\n", argv[i]);
-	exit (1);
+	FatalError("Xserver: host on strange network %s\n", argv[i]);
     }
 }
 
@@ -1310,13 +1303,11 @@
 
     if (i == argc)
     {
-	ErrorF("Xserver: missing -from host name in command line\n");
-	exit(1);
+	FatalError("Xserver: missing -from host name in command line\n");
     }
     if (!(hep = _XGethostbyname(argv[i], hparams)))
     {
-	ErrorF("Xserver: unknown host: %s\n", argv[i]);
-	exit(1);
+	FatalError("Xserver: unknown host: %s\n", argv[i]);
     }
     if (hep->h_length == sizeof (struct in_addr))
     {
@@ -1330,8 +1321,7 @@
     }
     else
     {
-	ErrorF ("Xserver: -from host on strange network %s\n", argv[i]);
-	exit (1);
+	FatalError("Xserver: -from host on strange network %s\n", argv[i]);
     }
     xdm_from = argv[i];
 }




More information about the xserver-commit mailing list