Initialize Tizen 2.3
[external/shadow-utils.git] / doc / console.c.spec.txt
1 $Id: console.c.spec.txt 1342 2007-11-10 23:46:11Z nekral-guest $
2
3 Specification for console.c source file --
4
5 input values --
6         tty -- character pointer to device name with leading "/dev/"
7                removed.
8
9 return values --
10         0 -- false
11         1 -- true
12
13 int console (char * tty)
14         if "CONSOLE" string value is not present in login.defs
15                 return true
16
17         if the first character of "CONSOLE" string value is not "/"
18                 treat the string as a ":" delimited list of device
19                 names and search for the value of tty in that
20                 tokenized list.
21
22                 if a match is found
23                         return true
24
25                 return false
26
27         if the file named by "CONSOLE" cannot be opened
28                 return true
29
30         scan the file looking for a match between the input line
31         and the value of tty
32
33         if a match is found
34                 return true
35
36         return false