[Tfug] How do you remove a file from a USB vfat - in c

jblais joe.blais at pti-instruments.com
Fri Nov 9 13:26:35 MST 2007


>
> You should be able to specify uid/gid as mount options;  That should
> fix problems with permissions.

I did add the uid - havent done the gid as part of the mount(...) method.

>
> >
> > But the file does at times seem to be gone, and they are
> definitely nuked to
> > 0 length.  I'm checking on my unmount not to see that the force unmount
> > isn't the problem.
>
> That is truly odd.
>

remove() tended to leave 0 length fiiles.  unlink() didn't touch the file
length when it failed.

I think I have it going, I try umount2(xyz, 0); several times (if it fails,
with a sleep),
then do a umount2(xyz,FORCE); at last.
The work cases of lingering files were if I just did a forced umount2.

I also added the uid as part of the 'data' parm of the mount, which may also
have helped.

> --
> RH
>





More information about the tfug mailing list