506 |
; |
; |
507 |
|
|
508 |
checkproc : CHECKPROC SERVICENAME PIDFILE PATH { |
checkproc : CHECKPROC SERVICENAME PIDFILE PATH { |
509 |
createservice(TASK_PROCESS, $<string>2,$4); |
createservice(TYPE_PROCESS, $<string>2,$4); |
510 |
check_name($<string>2); |
check_name($<string>2); |
511 |
} |
} |
512 |
| CHECKPROC SERVICENAME PATHTOK PATH { |
| CHECKPROC SERVICENAME PATHTOK PATH { |
513 |
createservice(TASK_PROCESS, $<string>2,$4); |
createservice(TYPE_PROCESS, $<string>2,$4); |
514 |
check_name($<string>2); |
check_name($<string>2); |
515 |
} |
} |
516 |
; |
; |
517 |
|
|
518 |
checkfile : CHECKFILE SERVICENAME PATHTOK PATH { |
checkfile : CHECKFILE SERVICENAME PATHTOK PATH { |
519 |
createservice(TASK_FILE, $<string>2,$4); |
createservice(TYPE_FILE, $<string>2,$4); |
520 |
check_name($<string>2); |
check_name($<string>2); |
521 |
} |
} |
522 |
; |
; |
523 |
|
|
524 |
checkdev : CHECKDEV SERVICENAME PATHTOK PATH { |
checkdev : CHECKDEV SERVICENAME PATHTOK PATH { |
525 |
createservice(TASK_DEVICE, $<string>2,$4); |
createservice(TYPE_DEVICE, $<string>2,$4); |
526 |
check_name($<string>2); |
check_name($<string>2); |
527 |
} |
} |
528 |
; |
; |
529 |
|
|
530 |
checkdir : CHECKDIR SERVICENAME PATHTOK PATH { |
checkdir : CHECKDIR SERVICENAME PATHTOK PATH { |
531 |
createservice(TASK_DIRECTORY, $<string>2,$4); |
createservice(TYPE_DIRECTORY, $<string>2,$4); |
532 |
check_name($<string>2); |
check_name($<string>2); |
533 |
} |
} |
534 |
; |
; |
968 |
* Create a new service object and add any current objects to the |
* Create a new service object and add any current objects to the |
969 |
* service list. |
* service list. |
970 |
*/ |
*/ |
971 |
static void createservice(int task, char *name, char *path) { |
static void createservice(int type, char *name, char *path) { |
972 |
|
|
973 |
ASSERT(name); |
ASSERT(name); |
974 |
ASSERT(path); |
ASSERT(path); |
991 |
current->uid= -1; |
current->uid= -1; |
992 |
current->gid= -1; |
current->gid= -1; |
993 |
|
|
994 |
current->task= task; |
current->type= type; |
995 |
current->name= name; |
current->name= name; |
996 |
current->path= path; |
current->path= path; |
997 |
|
|
1303 |
|
|
1304 |
|
|
1305 |
/* |
/* |
1306 |
* Add a new device to the current tasks device list |
* Add a new device to the current service's device list |
1307 |
*/ |
*/ |
1308 |
static void adddevice(struct DeviceSet *ds) { |
static void adddevice(struct DeviceSet *ds) { |
1309 |
|
|