summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-11-10 15:56:59 +0000
committerRoy Marples <uberlord@gentoo.org>2006-11-10 15:56:59 +0000
commitd3aec1c719a07ca3e1ecb4a4e606a643b3b28733 (patch)
tree6650ad6a027b6dd5074a2858945604ca69e5e6c3 /eclass/portability.eclass
parentVersion bump; confirmed with upstream it really made a huge version number leap. (diff)
downloadhistorical-d3aec1c719a07ca3e1ecb4a4e606a643b3b28733.tar.gz
historical-d3aec1c719a07ca3e1ecb4a4e606a643b3b28733.tar.bz2
historical-d3aec1c719a07ca3e1ecb4a4e606a643b3b28733.zip
get_mounts now returns mount options too
Diffstat (limited to 'eclass/portability.eclass')
-rw-r--r--eclass/portability.eclass14
1 files changed, 8 insertions, 6 deletions
diff --git a/eclass/portability.eclass b/eclass/portability.eclass
index f8d0a12f1d75..c198218083ee 100644
--- a/eclass/portability.eclass
+++ b/eclass/portability.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.9 2006/11/06 13:55:04 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.10 2006/11/10 15:56:59 uberlord Exp $
#
# Author: Diego Pettenò <flameeyes@gentoo.org>
#
@@ -131,15 +131,15 @@ get_bmake() {
}
# Portable method of getting mount names and points.
-# Returns as "point node fs"
+# Returns as "point node fs options"
# Remember to convert 040 back to a space.
get_mounts() {
- local point= node= fs= foo=
+ local point= node= fs= opts= foo=
# Linux has /proc/mounts which should always exist
if [[ $(uname -s) == "Linux" ]] ; then
- while read node point fs foo ; do
- echo "${point} ${node} ${fs}"
+ while read node point fs opts foo ; do
+ echo "${point} ${node} ${fs} ${opts}"
done < /proc/mounts
return
fi
@@ -153,7 +153,9 @@ get_mounts() {
# of the spaces and we should not force a /proc either.
local IFS=$'\t'
LC_ALL=C mount -p | while read node point fs foo ; do
- echo "${point// /\040} ${node// /\040} ${fs%% *}"
+ opts=${fs#* }
+ fs=${fs%% *}
+ echo "${point// /\040} ${node// /\040} ${fs%% *} ${opts// /\040}"
done
}