Skip to content

Instantly share code, notes, and snippets.

@tempelmann
Last active September 14, 2020 17:49
Show Gist options
  • Save tempelmann/65a8fab7c26a0b1bb638a384c5eb32c6 to your computer and use it in GitHub Desktop.
Save tempelmann/65a8fab7c26a0b1bb638a384c5eb32c6 to your computer and use it in GitHub Desktop.
// See https://twitter.com/tempelorg/status/1305559310760644612?s=20
// Turns out this is correct behavior.
// No more need for testing.
#include <stdio.h>
#include <sys/mount.h>
int main(int argc, const char * argv[]) {
struct statfs fsinfo;
statfs("/", &fsinfo);
printf("root device path: %s\n", fsinfo.f_mntfromname);
return 0;
}
@MonkeybreadSoftware
Copy link

Same result here for that code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment