File: loginshell.h

package info (click to toggle)
umview 0.8.2-3
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 5,472 kB
  • sloc: ansic: 67,309; sh: 11,160; ruby: 914; makefile: 424; python: 141
file content (15 lines) | stat: -rw-r--r-- 314 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef _LOGINSHELL
#define _LOGINSHELL
#include <string.h>

#define LOGIN_SHELL_ARG0 "viewos-login"
void loginshell_view(void);

static inline int isloginshell(const char *argv0)
{
	int len=strlen(argv0);
	/* argv0 has a -login suffix */
	return(len>6 && strcmp(argv0+(len-6),LOGIN_SHELL_ARG0+6) == 0);
}

#endif