#133043 - tondopie - Mon Jul 02, 2007 10:02 pm
I'm updating the GBAMP .nds file launching code to work with libfat. What is the libfat equivalent to FAT_GetFileCluster()?
tondopie wrote: |
thanks, does it matter which? stat() or fstat()? |
tondopie wrote: |
I'd probably want to use fstat() for this then |
man page wrote: |
NAME stat, fstat, lstat - get file status SYNOPSIS #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> int stat(const char *path, struct stat *buf); int fstat(int filedes, struct stat *buf); |
Code: |
warning: passing argument 2 of 'stat' makes pointer from integer without a cast
|
Code: |
struct stat st; u32 cluster; stat ("/testfile.nds", &st); cluster = st.st_ino; |
mml wrote: |
st.st_ino ;) |