ufs.subr (252987) | ufs.subr (253333) |
---|---|
1if [ ! "$_MEDIA_UFS_SUBR" ]; then _MEDIA_UFS_SUBR=1 2# 3# Copyright (c) 2012-2013 Devin Teske 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# | 1if [ ! "$_MEDIA_UFS_SUBR" ]; then _MEDIA_UFS_SUBR=1 2# 3# Copyright (c) 2012-2013 Devin Teske 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# |
27# $FreeBSD: head/usr.sbin/bsdconfig/share/media/ufs.subr 252987 2013-07-07 18:51:44Z dteske $ | 27# $FreeBSD: head/usr.sbin/bsdconfig/share/media/ufs.subr 253333 2013-07-14 03:08:52Z dteske $ |
28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." media/ufs.subr 34f_include $BSDCFG_SHARE/device.subr 35f_include $BSDCFG_SHARE/dialog.subr --- 111 unchanged lines hidden (view full) --- 147 f_show_msg "$msg_error_mounting_device" \ 148 "$devname" "$MOUNTPOINT" "$err" 149 return $FAILURE 150 fi 151 UFS_MOUNTED=1 152 return $SUCCESS 153} 154 | 28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." media/ufs.subr 34f_include $BSDCFG_SHARE/device.subr 35f_include $BSDCFG_SHARE/dialog.subr --- 111 unchanged lines hidden (view full) --- 147 f_show_msg "$msg_error_mounting_device" \ 148 "$devname" "$MOUNTPOINT" "$err" 149 return $FAILURE 150 fi 151 UFS_MOUNTED=1 152 return $SUCCESS 153} 154 |
155# f_media_get_ufs $device $file [$probe_only] | 155# f_media_get_ufs $device $file [$probe_type] |
156# 157# Returns data from $file on a mounted UFS partition device. Similar to cat(1). | 156# 157# Returns data from $file on a mounted UFS partition device. Similar to cat(1). |
158# If $probe_only is present and non-NULL, returns success if $file exists. | 158# If $probe_type is present and non-NULL, returns success if $file exists. If 159# $probe_type is equal to $PROBE_SIZE, prints the size of $file in bytes to 160# standard-out. |
159# 160f_media_get_ufs() 161{ | 161# 162f_media_get_ufs() 163{ |
162 local dev="$1" file="$2" probe_only="$3" | 164 local dev="$1" file="$2" probe_type="$3" |
163 | 165 |
164 f_dprintf "f_media_get_ufs: dev=[%s] file=[%s] probe_only=%s" \ 165 "$dev" "$file" "$probe_only" | 166 f_dprintf "f_media_get_ufs: dev=[%s] file=[%s] probe_type=%s" \ 167 "$dev" "$file" "$probe_type" |
166 | 168 |
167 f_media_generic_get "$MOUNTPOINT" "$file" "$probe_only" | 169 f_media_generic_get "$MOUNTPOINT" "$file" "$probe_type" |
168} 169 170# f_media_shutdown_ufs $device 171# 172# Shuts down the UFS device using umount(8). Return status should be ignored. 173# 174f_media_shutdown_ufs() 175{ --- 18 unchanged lines hidden --- | 170} 171 172# f_media_shutdown_ufs $device 173# 174# Shuts down the UFS device using umount(8). Return status should be ignored. 175# 176f_media_shutdown_ufs() 177{ --- 18 unchanged lines hidden --- |