Skip to content

Commit

Permalink
LABEL command to add timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
maron2000 committed Aug 4, 2024
1 parent c557b3d commit fbd8de0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/dos/drive_fat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,13 @@ void fatDrive::SetLabel(const char *label, bool /*iscdrom*/, bool /*updatable*/)
while (j < 11 && *s != 0) sectbuf[entryoffset].entryname[j++] = *s++;
while (j < 11) sectbuf[entryoffset].entryname[j++] = ' ';
}
writeSector(tmpsector,sectbuf);
uint16_t ct, cd;
time_t_to_DOS_DateTime(/*&*/ct,/*&*/cd, ::time(NULL));
sectbuf[entryoffset].modTime = ct;
sectbuf[entryoffset].modDate = cd;
sectbuf[entryoffset].accessDate = cd;

writeSector(tmpsector,sectbuf);
labelCache.SetLabel(label, false, true);
UpdateBootVolumeLabel(label);
return;
Expand Down

0 comments on commit fbd8de0

Please sign in to comment.