diff options
author | Roy Marples <uberlord@gentoo.org> | 2006-11-10 15:56:59 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2006-11-10 15:56:59 +0000 |
commit | e3b7a90c4b92566c7dbddd4d4ef3234e87c77e6e (patch) | |
tree | ec760a2f44e7e74e685ee000705f3fed0edfa903 /eclass/portability.eclass | |
parent | Version bump; confirmed with upstream it really made a huge version number leap. (diff) | |
download | gentoo-2-e3b7a90c4b92566c7dbddd4d4ef3234e87c77e6e.tar.gz gentoo-2-e3b7a90c4b92566c7dbddd4d4ef3234e87c77e6e.tar.bz2 gentoo-2-e3b7a90c4b92566c7dbddd4d4ef3234e87c77e6e.zip |
get_mounts now returns mount options too
Diffstat (limited to 'eclass/portability.eclass')
-rw-r--r-- | eclass/portability.eclass | 14 |
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 } |