mit-pdos / xv6-riscv

Xv6 for RISC-V
Other
6.63k stars 2.4k forks source link

[user/ls]: List specific device file #94

Closed jjolly closed 1 year ago

jjolly commented 2 years ago

When using the ls userspace program to list a specific device file, nothing would be displayed. This was because ls only tests for T_FILE and T_DIR. T_DEVICE files would fall through the case block.

Adding T_DEVICE to the T_FILE case allows a device file to be listed.

$ ls console
console        3 19 0