light: make trans_logger destructable by symlink removal

This commit is contained in:
Thomas Schoebel-Theuer 2014-02-03 10:54:58 +01:00
parent 9a8a4d7eb2
commit dbcbf9f782
1 changed files with 5 additions and 3 deletions

View File

@ -2406,10 +2406,11 @@ int make_log_init(void *buf, struct mars_dent *dent)
(const struct generic_brick_type*)&trans_logger_brick_type, (const struct generic_brick_type*)&trans_logger_brick_type,
(const struct generic_brick_type*[]){NULL}, (const struct generic_brick_type*[]){NULL},
1, // create when necessary, but leave in current state otherwise 1, // create when necessary, but leave in current state otherwise
"%s/logger", "%s/replay-%s",
(const char *[]){"%s/data-%s"}, (const char *[]){"%s/data-%s"},
1, 1,
parent_path, parent_path,
my_id(),
parent_path, parent_path,
my_id()); my_id());
rot->trans_brick = (void*)trans_brick; rot->trans_brick = (void*)trans_brick;
@ -3390,11 +3391,12 @@ int make_dev(void *buf, struct mars_dent *dent)
(const struct generic_brick_type*[]){(const struct generic_brick_type*)&trans_logger_brick_type}, (const struct generic_brick_type*[]){(const struct generic_brick_type*)&trans_logger_brick_type},
switch_on ? 2 : -1, switch_on ? 2 : -1,
"%s/device-%s", "%s/device-%s",
(const char *[]){"%s/logger"}, (const char *[]){"%s/replay-%s"},
1, 1,
parent->d_path, parent->d_path,
dent->d_argv[0], dent->d_argv[0],
parent->d_path); parent->d_path,
my_id());
rot->if_brick = (void*)dev_brick; rot->if_brick = (void*)dev_brick;
if (!dev_brick) { if (!dev_brick) {
MARS_DBG("device not shown\n"); MARS_DBG("device not shown\n");