aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/blkid.c
AgeCommit message (Collapse)Author
2013-10-07blkid cleanup: Convert tabs to spaces.Rob Landley
2013-10-07Add blkid.cBrad Conroy
I finally figured out the NTFS labels after reading a rant on how UTF-8 rocks and how MS switched to UTF16 or UCS1 or whatever. The reason I couldn't grep for the label (mine was "myntfs") was that it is stored as "m\0y\0n\0t\0f\0s\0\0" - found another good use for hexdump :) Notes: I only have x86 to test on, so there are a couple of places that may need bswap_{16,32} for endianness. I used a 65k buf instead of toybuf (4k) for simplicity, but tried to organize it for toybuf if wanted. I have info on more fs types, to patch with after review. blkid does output for all devices if 0 args -> read /proc/partitions?