|
@@ -340,6 +340,7 @@ static void
|
|
|
readctl(Req *r)
|
|
|
{
|
|
|
int i, isaudio;
|
|
|
+ ulong nwa;
|
|
|
char *p, *e, *ty;
|
|
|
char s[1024];
|
|
|
Msf *m;
|
|
@@ -375,9 +376,14 @@ readctl(Req *r)
|
|
|
ty = disctype(drive);
|
|
|
p = seprint(p, e, "%s", ty);
|
|
|
free(ty);
|
|
|
- if (drive->mmctype != Mmcnone)
|
|
|
- p = seprint(p, e, " next writable sector %lud",
|
|
|
- getnwa(drive));
|
|
|
+ if (drive->mmctype != Mmcnone) {
|
|
|
+ nwa = getnwa(drive);
|
|
|
+ p = seprint(p, e, " next writable sector ");
|
|
|
+ if (nwa == ~0ul)
|
|
|
+ p = seprint(p, e, "none; disc full");
|
|
|
+ else
|
|
|
+ p = seprint(p, e, "%lud", nwa);
|
|
|
+ }
|
|
|
seprint(p, e, "\n");
|
|
|
}
|
|
|
readstr(r, s);
|