206 /usr/xpg4/bin/tr '[:upper:] ' '[:lower:]_'`"
207 fi
208 # For consistency, hsfs filesystems detected at
209 # /dev/dsk/*p0 are mounted as /dev/dsk/*s2
210 FSTYPE=`echo "$fstyp_output" | /usr/bin/head -1`
211 if [ "$FSTYPE" = hsfs -a \
212 `/usr/bin/expr $FSPATH : '.*p0'` -gt 0 ]; then
213 FSPATH=`echo $FSPATH | /usr/bin/sed 's/p0$/s2/'`
214 fi
215 return
216 fi
217 done
218 }
219
220 #
221 # Find all mountpoints in use for a set of device special files.
222 # Usage: findmounts devpath ...
223 #
224
225 findmounts() {
226 nawk -f - -v vold_root="$VOLD_ROOT" -v devs="$*" /etc/mnttab <<\
227 "ENDOFAWKPGM"
228 BEGIN {
229 split(devs, devlist, " ");
230 for (devN in devlist) {
231 dev = devlist[devN];
232 realdevlist[dev] = 1;
233 sub(/.*\//, "", dev);
234 sub(/s[0-9]$/, "", dev);
235 if (vold_root != "") {
236 vold_dir[vold_root "/dev/dsk/" dev] = 1;
237 vold_dir[vold_root "/dev/rdsk/" dev] = 1;
238 }
239 }
240 }
241
242 {
243 for (dev in realdevlist) {
244 if ($1 == dev) {
245 mountpoint = $2;
246 print mountpoint;
|
206 /usr/xpg4/bin/tr '[:upper:] ' '[:lower:]_'`"
207 fi
208 # For consistency, hsfs filesystems detected at
209 # /dev/dsk/*p0 are mounted as /dev/dsk/*s2
210 FSTYPE=`echo "$fstyp_output" | /usr/bin/head -1`
211 if [ "$FSTYPE" = hsfs -a \
212 `/usr/bin/expr $FSPATH : '.*p0'` -gt 0 ]; then
213 FSPATH=`echo $FSPATH | /usr/bin/sed 's/p0$/s2/'`
214 fi
215 return
216 fi
217 done
218 }
219
220 #
221 # Find all mountpoints in use for a set of device special files.
222 # Usage: findmounts devpath ...
223 #
224
225 findmounts() {
226 /usr/xpg4/bin/awk -f - -v vold_root="$VOLD_ROOT" -v devs="$*" /etc/mnttab <<\
227 "ENDOFAWKPGM"
228 BEGIN {
229 split(devs, devlist, " ");
230 for (devN in devlist) {
231 dev = devlist[devN];
232 realdevlist[dev] = 1;
233 sub(/.*\//, "", dev);
234 sub(/s[0-9]$/, "", dev);
235 if (vold_root != "") {
236 vold_dir[vold_root "/dev/dsk/" dev] = 1;
237 vold_dir[vold_root "/dev/rdsk/" dev] = 1;
238 }
239 }
240 }
241
242 {
243 for (dev in realdevlist) {
244 if ($1 == dev) {
245 mountpoint = $2;
246 print mountpoint;
|