log slot details only if its allocated

This commit is contained in:
Alexandre Ratchov 2012-10-08 18:26:44 +02:00
parent a525ed859b
commit 792b22dc90
1 changed files with 6 additions and 4 deletions

View File

@ -101,10 +101,12 @@ slot_log(struct slot *s)
if (log_level >= 3) {
log_puts(",vol=");
log_putu(s->vol);
log_puts(",pst=");
log_puts(pstates[s->pstate]);
log_puts(",mmc=");
log_puts(tstates[s->tstate]);
if (s->ops) {
log_puts(",pst=");
log_puts(pstates[s->pstate]);
log_puts(",mmc=");
log_puts(tstates[s->tstate]);
}
}
#endif
}