added safemode
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8718 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
49d4da23f6
commit
8291ca0379
|
@ -23,6 +23,7 @@ StdBinCommands
|
|||
renice.c
|
||||
rescan.c
|
||||
rmattr.cpp
|
||||
safemode.c
|
||||
sleep.cpp
|
||||
sysinfo.c
|
||||
unchop.c
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
/* safemode.c - tells if safemode is active
|
||||
* (c) 2004, Jérôme DUVAL for Haiku
|
||||
* released under the MIT licence.
|
||||
*
|
||||
* ChangeLog:
|
||||
* 08-29-2004 v1.0
|
||||
* Initial.
|
||||
*
|
||||
* safemode
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <strings.h>
|
||||
#include <SupportDefs.h>
|
||||
|
||||
// i don't know the exact signature but this one works
|
||||
extern status_t _kget_safemode_option_(char* name, uint8 *p1, uint32 *p2);
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
uint8 p1;
|
||||
uint32 p2 = 1;
|
||||
status_t err;
|
||||
|
||||
err = _kget_safemode_option_("safemode", &p1, &p2);
|
||||
if (err == B_OK) {
|
||||
printf("yes\n");
|
||||
} else
|
||||
printf("no\n");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue