Skip to content

Commit

Permalink
Add movecommand and commandtimeout config option
Browse files Browse the repository at this point in the history
Defined in device.conf. Currently not implemented.

Signed-off-by: Ivo De Decker <ivo.dedecker@ugent.be>
  • Loading branch information
Ivo De Decker authored and markh794 committed Apr 26, 2012
1 parent 2bddeba commit f8d1e44
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions usr/vtllibrary.c
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,9 @@ static int init_lu(struct lu_phy_attr *lu, int minor, struct vtl_ctl *ctl)
lu->fifo_fd = NULL;
lu->fifo_flag = 0;

smc_slots.movecommand = NULL;
smc_slots.commandtimeout = 20;

/* While read in a line */
while (readline(b, MALLOC_SZ, conf) != NULL) {
if (b[0] == '#') /* Ignore comments */
Expand Down Expand Up @@ -1056,6 +1059,12 @@ static int init_lu(struct lu_phy_attr *lu, int minor, struct vtl_ctl *ctl)
if (sscanf(b, " fifo: %s", s))
process_fifoname(lu, s, 0);

if (sscanf(b, " movecommand: %s", s))
smc_slots.movecommand=strndup(s,MALLOC_SZ);

if (sscanf(b, " commandtimeout: %d", &d))
smc_slots.commandtimeout=d;

i = sscanf(b,
" NAA: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",
&c, &d, &e, &f, &g, &h, &j, &k);
Expand Down

0 comments on commit f8d1e44

Please sign in to comment.