[Ardour-Dev] GTK+ (concepts and advice)

John Emmas johne53 at tiscali.co.uk
Tue Jun 17 03:13:06 PDT 2008


Thanks Ben & Fons - this is all very helpful info.

Ben, the response I got to 'man 2 stat' was that there was no entry topic
available.  Having never used 'man' before, what should I do to bring it up
to date?

Thanks,

John


----- Original Message -----
From: "Fons Adriaensen" <fons at kokkinizita.net>
To: <ardour-dev at lists.ardour.org>
Sent: 17 June 2008 10:50
Subject: Re: [Ardour-Dev] GTK+ (concepts and advice)


> On Tue, Jun 17, 2008 at 10:17:49AM -0000, John Emmas wrote:
>
> > However, this brings up the question of assessing/determining the
partition.
> > Given only a path to a file, what calls can a programmer use to
determine
> > which partition it's located on?  Under Windows it's relatively simple
> > because partitons are assigned with a drive letter and from a drive
letter
> > you can get information about the associated volume.  So even if
(unusually)
> > a given partition was being referenced by 2 different drive letters, you
> > could still work out that they're the same partiton.  I assume that's
also
> > feasible for Linux but maybe a bit trickier?
>
> You could read and parse /etc/mtab.
> A better way is to use getmntent() to do this.
>
> But the easiest way out would be to just call link() if you want the
> link to be made. It will fail with a specific error code EXDEV if
> the link can't be made because the paths are on different filesystems.
>
> --
> FA
>
> Laboratorio di Acustica ed Elettroacustica
> Parma, Italia
>
> Lascia la spina, cogli la rosa.
>
> _______________________________________________
> ardour-dev mailing list
> ardour-dev at lists.ardour.org
> http://lists.ardour.org/listinfo.cgi/ardour-dev-ardour.org
>




More information about the Ardour-Dev mailing list