Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 248375 Details for
Bug 336723
baselayout-1_12 (rev. 3163): we cannot rely on stat (associated with #291916)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
functions.sh-is_mounted-is_clean-simplified.patch
functions.sh-is_mounted-is_clean-simplified.patch (text/plain), 1000 bytes, created by
Amadeusz Żołnowski (RETIRED)
on 2010-09-22 17:44:34 UTC
(
hide
)
Description:
functions.sh-is_mounted-is_clean-simplified.patch
Filename:
MIME Type:
Creator:
Amadeusz Żołnowski (RETIRED)
Created:
2010-09-22 17:44:34 UTC
Size:
1000 bytes
patch
obsolete
>Index: branches/baselayout-1_12/sbin/functions.sh >=================================================================== >--- branches/baselayout-1_12/sbin/functions.sh (revision 3174) >+++ branches/baselayout-1_12/sbin/functions.sh (working copy) >@@ -784,6 +784,31 @@ > echo "${result# *}" > } > >+# bool is_clean(dir) >+# >+# Returns 0 if given directory has no files or has only dot-prefixed files. >+# >+# EXAMPLE: if is_clean /proc; then ... >+is_clean() { >+ local f >+ >+ for f in $1/*; do >+ [[ -e $f || -L $f ]] && return 1 >+ done >+ >+ return 0 >+} >+ >+# bool is_mounted(mount point) >+# >+# Returns 0 if 'mount point' is really a mount point or non-zerio if it's >+# not. >+# >+# EXAMPLE: if is_mounted /dev/pts; then ... >+is_mounted() { >+ mountpoint -q "$1" >+} >+ > ############################################################################## > # # > # This should be the last code in here, please add all functions above!! #
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 336723
:
246715
|
246716
|
247871
| 248375 |
248377