2004-11-25 21:34:45 +03:00
|
|
|
/*
|
2004-08-29 23:20:38 +04:00
|
|
|
* (c) 2004, Jérôme DUVAL for Haiku
|
|
|
|
* released under the MIT licence.
|
|
|
|
*/
|
|
|
|
|
2004-11-25 21:34:45 +03:00
|
|
|
|
2005-03-31 15:11:17 +04:00
|
|
|
#include <drivers/driver_settings.h>
|
2004-11-25 21:34:45 +03:00
|
|
|
#include <syscalls.h>
|
|
|
|
|
2004-08-29 23:20:38 +04:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <strings.h>
|
|
|
|
|
|
|
|
|
2004-11-25 21:34:45 +03:00
|
|
|
int
|
|
|
|
main(int argc, char **argv)
|
2004-08-29 23:20:38 +04:00
|
|
|
{
|
2004-11-25 21:34:45 +03:00
|
|
|
char buffer[B_FILE_NAME_LENGTH];
|
|
|
|
size_t size = sizeof(buffer);
|
|
|
|
|
2005-03-31 15:11:17 +04:00
|
|
|
status_t status = _kern_get_safemode_option(B_SAFEMODE_SAFE_MODE, buffer, &size);
|
2004-11-25 21:34:45 +03:00
|
|
|
if (status == B_OK) {
|
|
|
|
if (!strncasecmp(buffer, "true", size)
|
|
|
|
|| !strncasecmp(buffer, "yes", size)
|
|
|
|
|| !strncasecmp(buffer, "on", size)
|
|
|
|
|| !strncasecmp(buffer, "enabled", size)) {
|
|
|
|
puts("yes");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
puts("no");
|
2004-08-29 23:20:38 +04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|