root/trunk/lib/checkconfig.c
| Revision 2464, 1.2 kB (checked in by dhozac, 2 years ago) | |
|---|---|
| |
| Line | |
|---|---|
| 1 | // $Id$ --*- c++ -*-- |
| 2 | |
| 3 | // Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> |
| 4 | // Copyright (C) 2006 Daniel Hokka Zakrisson |
| 5 | // |
| 6 | // This program is free software; you can redistribute it and/or modify |
| 7 | // it under the terms of the GNU General Public License as published by |
| 8 | // the Free Software Foundation; version 2 of the License. |
| 9 | // |
| 10 | // This program is distributed in the hope that it will be useful, |
| 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | // GNU General Public License for more details. |
| 14 | // |
| 15 | // You should have received a copy of the GNU General Public License |
| 16 | // along with this program; if not, write to the Free Software |
| 17 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 18 | |
| 19 | |
| 20 | #ifdef HAVE_CONFIG_H |
| 21 | # include <config.h> |
| 22 | #endif |
| 23 | |
| 24 | #include "vserver.h" |
| 25 | #include "vserver-internal.h" |
| 26 | |
| 27 | uint_least32_t |
| 28 | utilvserver_checkCompatConfig() |
| 29 | { |
| 30 | #ifdef VC_ENABLE_API_V21 |
| 31 | static uint32_t res=0; |
| 32 | static int v_errno; |
| 33 | |
| 34 | if (res==0) { |
| 35 | res = vc_get_vci(); |
| 36 | v_errno = errno; |
| 37 | if (res==(uint32_t)-1) res=0; |
| 38 | } |
| 39 | |
| 40 | errno = v_errno; |
| 41 | return res; |
| 42 | #else |
| 43 | return 0; |
| 44 | #endif |
| 45 | } |
Note: See TracBrowser for help on using the browser.
