]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netat/aurp_cfg.c
xnu-792.22.5.tar.gz
[apple/xnu.git] / bsd / netat / aurp_cfg.c
index 3cc415f0ecbfb8846529bb14ac076eb9675f351c..7f610a9870c7d5e3da4db12c9478be37826f054c 100644 (file)
@@ -1,16 +1,19 @@
 /*
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
  * 
  * The Original Code and all software distributed under the License are
  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
@@ -20,7 +23,7 @@
  * Please see the License for the specific language governing rights and
  * limitations under the License.
  * 
- * @APPLE_LICENSE_HEADER_END@
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  */
 /*
  *     Copyright (c) 1996 Apple Computer, Inc. 
@@ -30,6 +33,9 @@
  *
  *     File: cfg.c
  */
+#ifdef AURP_SUPPORT
+
 #define RESOLVE_DBG
 #include <sys/errno.h>
 #include <sys/types.h>
@@ -52,7 +58,6 @@
 #include <netat/at_pcb.h>
 #include <netat/aurp.h>
 
-extern atlock_t aurpgen_lock;
 static int aurp_inited = 0;
 static char aurp_minor_no[4];
 
@@ -62,10 +67,8 @@ int aurp_open(gref)
        extern void AURPcmdx();
        int i;
 
-       if (!aurp_inited) {
+       if (!aurp_inited)
                aurp_inited = 1;
-               ATLOCKINIT(aurpgen_lock);
-       }
 
        for (i=1; i < sizeof(aurp_minor_no); i++) {
                if (aurp_minor_no[i] == 0) {
@@ -80,7 +83,7 @@ int aurp_open(gref)
                if (ddp_AURPfuncx(AURPCODE_REG, AURPcmdx, 0)) {
                        aurp_gref = 0;
                        aurp_minor_no[i] = 0;
-                       return EPROTO;
+                       return EPROTOTYPE;
                }
        }
 
@@ -101,3 +104,5 @@ int aurp_close(gref)
        gref->info = 0;
        return 0;
 }
+
+#endif  /* AURP_SUPPORT */