Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-04-07 20:37:20 +0400
committerCorinna Vinschen <corinna@vinschen.de>2008-04-07 20:37:20 +0400
commitf471ca85e17ea1b4fdc317527cfdba3e4463e359 (patch)
tree5afa060db53e95094dd4ead9be69c7688854918b
parentf7852548bbf47c13a9c6efbdeec51b5bb3a5f0bf (diff)
* postinstall: Add function print_flags and call where appropriate.
Omit system and cygdrive flag when testing cygdrive flags.
-rw-r--r--winsup/cygwin/ChangeLog5
-rwxr-xr-xwinsup/cygwin/postinstall26
2 files changed, 19 insertions, 12 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 51e038aef..914611034 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * postinstall: Add function print_flags and call where appropriate.
+ Omit system and cygdrive flag when testing cygdrive flags.
+
2008-04-07 Christopher Faylor <me+cygwin@cgf.cx>
Add miscfuncs.h to files as needed throughout.
diff --git a/winsup/cygwin/postinstall b/winsup/cygwin/postinstall
index bdcc033bf..69ec04936 100755
--- a/winsup/cygwin/postinstall
+++ b/winsup/cygwin/postinstall
@@ -12,6 +12,15 @@ export PATH="/bin:$PATH"
DEVDIR=/dev
+print_flags ()
+{
+ (( $1 & 0x0002 )) && echo -n "binary" || echo -n "text"
+ (( $1 & 0x0010 )) && echo -n ",exec"
+ (( $1 & 0x0040 )) && echo -n ",cygexec"
+ (( $1 & 0x0100 )) && echo -n ",notexec"
+ (( $1 & 0x0800 )) && echo -n ",managed"
+}
+
# Create fstab file if it doesn't exist.
if [ -e "/etc/fstab" -a ! -f "/etc/fstab" ]
then
@@ -130,11 +139,7 @@ EOF
psx="${subkey// /\\040}"
flags=$(regtool -q get "$key\\$subkey\flags")
echo -n "${nat} ${psx} some_fs "
- (( $flags & 0x0002 )) && echo -n "binary" || echo -n "text"
- (( $flags & 0x0010 )) && echo -n ",exec"
- (( $flags & 0x0040 )) && echo -n ",cygexec"
- (( $flags & 0x0100 )) && echo -n ",notexec"
- (( $flags & 0x0800 )) && echo -n ",managed"
+ print_flags $flags
echo " 0 0"
fi >> /etc/fstab
done
@@ -145,17 +150,14 @@ EOF
cygd=""
prefix=$(regtool -q get "$key\cygdrive prefix")
- flags=$(regtool -q get "$key\cygdrive flags")
- if [ -n "$prefix" -a \( "$prefix" != "/cygdrive" -o "$flags" -ne 42 \) ]
+ # Don't take system and cygdrive flags into account when testing
+ if [ -n "$prefix" \
+ -a \( "$prefix" != "/cygdrive" \ -o "$(( $flags & ~0x28 ))" -ne 2 \) ]
then
cygd="1"
psx="${prefix// /\\040}"
echo -n "none ${psx} cygdrive "
- (( $flags & 0x0002 )) && echo -n "binary" || echo -n "text"
- (( $flags & 0x0010 )) && echo -n ",exec"
- (( $flags & 0x0040 )) && echo -n ",cygexec"
- (( $flags & 0x0100 )) && echo -n ",notexec"
- (( $flags & 0x0800 )) && echo -n ",managed"
+ print_flags $flags
echo ",user 0 0"
fi >> /etc/fstab