4 * UPS linked list functions.
8 * Copyright (C) 1996-99 Andre M. Hedrick <andre@suse.com>
9 * Copyright (C) 1999-2001 Riccardo Facchetti <riccardo@master.oasi.gpa.it>
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of version 2 of the GNU General
13 * Public License as published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
20 * You should have received a copy of the GNU General Public
21 * License along with this program; if not, write to the Free
22 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
28 static UPSINFO
*upshead
= NULL
;
31 * The linked list need to be defined in _all_ the forked processes.
32 * The syncronization of data into this structure is done with the shared
33 * memory area so this is made reentrant by the shm mechanics.
36 int insertUps(UPSINFO
*ups
)
38 UPSINFO
*ptr
= upshead
;
51 UPSINFO
*getNextUps(UPSINFO
*ups
)
59 UPSINFO
*getUpsByname(char *name
)
63 for (ups
= NULL
; (ups
= getNextUps(ups
)) != NULL
;) {
64 if (strncmp(name
, ups
->upsname
, strlen(ups
->upsname
)) == 0)