|
List Info
Thread: Cygwin::mount_table, Cygwin::mount_flags
|
|
| Cygwin::mount_table,
Cygwin::mount_flags |

|
2007-08-14 01:40:44 |
This patch adds two new functions Cygwin::mount_table() and
Cygwin::mount_flags(mnt_dir).
Required to be able to detect managed mounts and
case-sensitivity,
e.g, for the upcoming File::Spec->case_tolerant patch.
Thanks to Jan Dubois again for helping with some quirks.
Unrelated, but near:
Someone questioned the two complementary functions
is_binmount() and
is_textmount() as bloat.
is_textmount() is more readable than !is_binmount()
Not everyone knows that there only exist such two kinds of
special
cygwin mount handling for CRLF massage.
And who knows, maybe later some years will arrive a
Mac-system friendly
text handling?
--
Reini Urban
http://phpwiki.org/ http://murbreak.at/
http://helsinki.at/ http://spacemovie.mur.at/
a>
|
|
|
| Re: Cygwin::mount_table,
Cygwin::mount_flags |

|
2007-08-14 01:56:15 |
At 2007-08-14 08:40:44 +0200, rurban x-ray.at wrote:
>
> This patch adds two new functions Cygwin::mount_table()
and
> Cygwin::mount_flags(mnt_dir).
Thanks, applied. (#31708)
-- ams
|
|
| Re: Cygwin::mount_table,
Cygwin::mount_flags |

|
2007-08-16 01:46:56 |
On Mon, August 13, 2007 11:40 pm, Reini Urban wrote:
> This patch adds two new functions Cygwin::mount_table()
and
> Cygwin::mount_flags(mnt_dir).
> Required to be able to detect managed mounts and
case-sensitivity,
> e.g, for the upcoming File::Spec->case_tolerant
patch.
I don't have a cygwin to try with at the moment, but how
does this
handle it when there's both a user and a system mount for
the same
path? (I forget which takes precedence.)
|
|
| Re: Cygwin::mount_table,
Cygwin::mount_flags |

|
2007-08-16 13:17:13 |
Yitzchak Scott-Thoennes schrieb:
> On Mon, August 13, 2007 11:40 pm, Reini Urban wrote:
>> This patch adds two new functions
Cygwin::mount_table() and
>> Cygwin::mount_flags(mnt_dir).
>> Required to be able to detect managed mounts and
case-sensitivity,
>> e.g, for the upcoming File::Spec->case_tolerant
patch.
>
> I don't have a cygwin to try with at the moment, but
how does this
> handle it when there's both a user and a system mount
for the same
> path? (I forget which takes precedence.)
This is explained in the README.
=item C<Cygwin::mount_flags>
Returns the mount type and flags for a specified mount
point.
A comma-seperated string of mntent->mnt_type (always
"system" or "user"), then the
mntent->mnt_opts, where
the first is always "binmode" or
"textmode".
system|user,binmode|textmode,exec,cygexec,cygdrive,mixed,
notexec,managed,nosuid,devfs,proc,noumount
If the argument is "/cygdrive", just the volume
mount settings are
returned.
User mounts override system mounts.
$ perl -e 'print Cygwin::mount_flags
"/usr/bin"'
system,binmode,cygexec
$ perl -e 'print Cygwin::mount_flags
"/cygdrive"'
binmode,cygdrive
--
Reini Urban
http://phpwiki.org/ http://murbreak.at/
http://helsinki.at/ http://spacemovie.mur.at/
a>
|
|
| Re: Cygwin::mount_table,
Cygwin::mount_flags |

|
2007-08-16 13:42:09 |
On Thu, August 16, 2007 11:17 am, Reini Urban wrote:
> Yitzchak Scott-Thoennes schrieb:
>> On Mon, August 13, 2007 11:40 pm, Reini Urban
wrote:
>>> This patch adds two new functions
Cygwin::mount_table() and
>>> Cygwin::mount_flags(mnt_dir).
>>> Required to be able to detect managed mounts
and case-sensitivity,
>>> e.g, for the upcoming
File::Spec->case_tolerant patch.
>>
>> I don't have a cygwin to try with at the moment,
but how does this
>> handle it when there's both a user and a system
mount for the same path?
>> (I forget which takes precedence.)
>
> This is explained in the README.
>
> =item C<Cygwin::mount_flags>
Sorry, I meant to be asking about mount_table. Does it
return
both the system and user entries if there are both for the
same
path?
|
|
| Re: Cygwin::mount_table,
Cygwin::mount_flags |

|
2007-08-16 13:59:01 |
Yitzchak Scott-Thoennes schrieb:
> On Thu, August 16, 2007 11:17 am, Reini Urban wrote:
>> Yitzchak Scott-Thoennes schrieb:
>>> On Mon, August 13, 2007 11:40 pm, Reini Urban
wrote:
>>>> This patch adds two new functions
Cygwin::mount_table() and
>>>> Cygwin::mount_flags(mnt_dir).
>>>> Required to be able to detect managed
mounts and case-sensitivity,
>>>> e.g, for the upcoming
File::Spec->case_tolerant patch.
>>> I don't have a cygwin to try with at the
moment, but how does this
>>> handle it when there's both a user and a system
mount for the same path?
>>> (I forget which takes precedence.)
>> This is explained in the README.
>>
>> =item C<Cygwin::mount_flags>
>
> Sorry, I meant to be asking about mount_table. Does it
return
> both the system and user entries if there are both for
the same
> path?
Ah, sorry. I mixed that up.
With mount_table() the user entries are always listed BEFORE
system
entries. This is especially sorted to avoid discrepancies.
With mount_flags() I do it manually to match mount_table().
Cygwin::mount_table always matches the output of
/usr/bin/mount.
We just spare the system call and avoid string splitting.
That's why into CORE and not as some CPAN module.
$ mount -m
mount -f -s -b -X "f:/cygwin/bin"
"/bin"
mount -f -s -b "f:/cygwin/bin"
"/usr/bin"
mount -f -s -b "f:/cygwin/lib"
"/usr/lib"
mount -f -s -b "f:/cygwin" "/"
mount -f -u -t "e:/tmp" "/texttest"
mount -s -b --change-cygdrive-prefix "/cygdrive"
$ mount -f -u -b "f:/cygwin/lib"
"/usr/lib"
$ mount
f:cygwinbin on /bin type system (binmode,cygexec
f:cygwinbin on /usr/bin type system (binmode)
f:cygwinlib on /usr/lib type user (binmode)
f:cygwinlib on /usr/lib type system (binmode)
f:cygwin on / type system (binmode)
e:tmp on /texttest type user (textmode)
c: on /cygdrive/c type system (binmode,noumount)
d: on /cygdrive/d type system (binmode,noumount)
e: on /cygdrive/e type system (binmode,noumount)
f: on /cygdrive/f type system (binmode,noumount)
h: on /cygdrive/h type system (binmode,noumount)
i: on /cygdrive/i type system (binmode,noumount)
m: on /cygdrive/m type system (binmode,noumount)
n: on /cygdrive/n type system (binmode,noumount)
p: on /cygdrive/p type system (binmode,noumount)
r: on /cygdrive/r type system (binmode,noumount)
s: on /cygdrive/s type system (binmode,noumount)
u: on /cygdrive/u type system (binmode,noumount)
v: on /cygdrive/v type system (binmode,noumount)
w: on /cygdrive/w type system (binmode,noumount)
$ perlblead -e 'for $i (Cygwin::mount_table) {print
join(" ", $i),"n";}'
/bin f:cygwinbin system binmode,cygexec
/usr/bin f:cygwinbin system binmode
/usr/lib f:cygwinlib user binmode
/usr/lib f:cygwinlib system binmode
/ f:cygwin system binmode
/texttest e:tmp user textmode
/cygdrive/c c: system binmode,noumount
/cygdrive/d d: system binmode,noumount
/cygdrive/e e: system binmode,noumount
/cygdrive/f f: system binmode,noumount
/cygdrive/h h: system binmode,noumount
/cygdrive/i i: system binmode,noumount
/cygdrive/m m: system binmode,noumount
/cygdrive/n n: system binmode,noumount
/cygdrive/p p: system binmode,noumount
/cygdrive/r r: system binmode,noumount
/cygdrive/s s: system binmode,noumount
/cygdrive/u u: system binmode,noumount
/cygdrive/v v: system binmode,noumount
/cygdrive/w w: system binmode,noumount
--
Reini Urban
http://phpwiki.org/ http://murbreak.at/
http://helsinki.at/ http://spacemovie.mur.at/
a>
|
|
| Re: Cygwin::mount_table,
Cygwin::mount_flags |

|
2007-08-16 15:25:53 |
On Thu, August 16, 2007 11:59 am, Reini Urban wrote:
> Yitzchak Scott-Thoennes schrieb:
>> Sorry, I meant to be asking about mount_table.
Does it return
>> both the system and user entries if there are both
for the same path?
>
> Ah, sorry. I mixed that up.
>
> With mount_table() the user entries are always listed
BEFORE system
> entries. This is especially sorted to avoid
discrepancies. With
> mount_flags() I do it manually to match mount_table().
Cygwin::mount_table
> always matches the output of /usr/bin/mount. We just
spare the system call
> and avoid string splitting. That's why into CORE and
not as some CPAN
> module.
This might be a good idea:
--- perl-current/t/lib/cygwin.t.orig 2007-08-16
13:19:44.000000000 -0700
+++ perl-current/t/lib/cygwin.t 2007-08-16
13:21:23.000000000 -0700
 -57,5
+57,6 
for $i ( mnttbl) {
if ($i->[0] eq '/') {
is($i->[2].",".$i->[3], $rootmnt,
"same root mount flags");
+ last;
}
}
|
|
| Re: Cygwin::mount_table,
Cygwin::mount_flags |

|
2007-08-17 00:58:13 |
Yitzchak Scott-Thoennes schrieb:
> On Thu, August 16, 2007 11:59 am, Reini Urban wrote:
>> Yitzchak Scott-Thoennes schrieb:
>>> Sorry, I meant to be asking about mount_table.
Does it return
>>> both the system and user entries if there are
both for the same path?
>> Ah, sorry. I mixed that up.
>>
>> With mount_table() the user entries are always
listed BEFORE system
>> entries. This is especially sorted to avoid
discrepancies. With
>> mount_flags() I do it manually to match
mount_table(). Cygwin::mount_table
>> always matches the output of /usr/bin/mount. We
just spare the system call
>> and avoid string splitting. That's why into CORE
and not as some CPAN
>> module.
>
> This might be a good idea:
>
> --- perl-current/t/lib/cygwin.t.orig 2007-08-16
13:19:44.000000000 -0700
> +++ perl-current/t/lib/cygwin.t 2007-08-16
13:21:23.000000000 -0700
>  -57,5 +57,6 
> for $i ( mnttbl) {
> if ($i->[0] eq '/') {
> is($i->[2].",".$i->[3], $rootmnt,
"same root mount flags");
> + last;
> }
> }
Yes, please.
There might be two.
|
|
| Re: Cygwin::mount_table,
Cygwin::mount_flags |

|
2007-08-29 03:55:36 |
On 16/08/2007, Yitzchak Scott-Thoennes <sthoenna efn.org> wrote:
> This might be a good idea:
>
> --- perl-current/t/lib/cygwin.t.orig 2007-08-16
13:19:44.000000000 -0700
> +++ perl-current/t/lib/cygwin.t 2007-08-16
13:21:23.000000000 -0700
Thanks, applied as #31760.
>  -57,5 +57,6 
> for $i ( mnttbl) {
> if ($i->[0] eq '/') {
> is($i->[2].",".$i->[3], $rootmnt,
"same root mount flags");
> + last;
> }
> }
>
>
>
|
|
[1-9]
|
|