Ticket #3207: 0001-Add-a-stub-implementation-for-utmpx.h.patch
File 0001-Add-a-stub-implementation-for-utmpx.h.patch, 3.1 KB (added by , 11 years ago) |
---|
-
new file headers/posix/sys/utmpx.h
From 4d583fd750a0c5742c9aad3ecc257f23cbb0176f Mon Sep 17 00:00:00 2001 From: Vibhav Pant <vibhavp@ubuntu.com> Date: Mon, 10 Dec 2012 22:01:00 +0530 Subject: [PATCH] Add a stub implementation for utmpx.h --- headers/posix/sys/utmpx.h | 49 ++++++++++++++++++++++++++++++++++ src/system/libroot/posix/sys/utmpx.c | 46 +++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 headers/posix/sys/utmpx.h create mode 100644 src/system/libroot/posix/sys/utmpx.c diff --git a/headers/posix/sys/utmpx.h b/headers/posix/sys/utmpx.h new file mode 100644 index 0000000..971d954
- + 1 /* 2 * Copyright 2012 Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 // As of now, Haiku doesnt have multiuser support, this header provides a stub implementation 7 8 #ifndef _SYS_UTMPX_H 9 #define _SYS_UTMPX_H 10 11 #include <sys/types.h> 12 #include <sys/time.h> 13 14 15 // Symbolic constants for ut_type 16 #define EMPTY 0x01 // No valid user accounting information. 17 #define BOOT_TIME 0x02 // Identifies time of system boot. 18 #define OLD_TIME 0x03 // Identifies time when system clock changed. 19 #define NEW_TIME 0x04 // Identifies time after system clock changed. 20 #define USER_PROCESS 0x05 // Identifies a process. 21 #define INIT_PROCESS 0x06 // Identifies a process spawned by the init process. 22 #define LOGIN_PROCESS 0x07 // Identifies the session leader of a logged-in user 23 #define DEAD_PROCESS 0x08 // Identifies a session leader who has exited. 24 25 struct utmpx 26 { 27 char *ut_user; // User login name 28 char *ut_it; // Unspecified initialization process identifier. 29 char *ut_line; // Device name 30 pid_t ut_id; // Process ID 31 short ut_type; // Type of entry 32 struct timeval ut_tv; // Time entry was made 33 } 34 #ifdef __cplusplus 35 extern "C" { 36 #endif 37 38 extern void endutxent(void); 39 extern struct utmpx *getutxent(void); 40 extern struct utmpx *getutxid(const struct utmpx *); 41 extern struct utmpx *getutxline(const struct utmpx *); 42 extern struct utmpx *pututxline(const struct utmpx *); 43 extern void setutxent(void); 44 45 #ifdef __cplusplus 46 } 47 #endif 48 49 #endif // _SYS_UTMPX_H -
new file src/system/libroot/posix/sys/utmpx.c
diff --git a/src/system/libroot/posix/sys/utmpx.c b/src/system/libroot/posix/sys/utmpx.c new file mode 100644 index 0000000..45db14f
- + 1 /* 2 * Copyright 2012, Vibhav Pant, vibhavp@gmail.com. 3 * Distributed under the terms of the MIT License. 4 */ 5 #include <sys/utmpx.h> 6 7 void 8 endutxent(void) 9 { 10 return; 11 } 12 13 14 struct utmpx * 15 getutxent(void) 16 { 17 return NULL; 18 } 19 20 21 struct utmpx * 22 getutxid(const struct utmpx *) 23 { 24 return NULL; 25 } 26 27 28 struct utmpx * 29 getutxline(const struct utmpx *) 30 { 31 return NULL; 32 } 33 34 35 struct utmpx * 36 pututxline(const struct utmpx *) 37 { 38 return NULL; 39 } 40 41 42 void 43 setutxent(void) 44 { 45 return; 46 }