freebsd-dev/usr.sbin/bsdconfig
Devin Teske dde7be41df Re-implement $probe_only aspect of f_media_get_TYPE() (where TYPE is cdrom,
nfs, ftp, http, httpproxy, etc.) and f_device_get() (abstract method for
calling aforementioned f_media_get_TYPE()).

Previously, if $probe_only was present and non-NULL, the TYPE functions
would check for $file and exit with an appropriate error status (success if
the file exists and readable, failure otherwise).

While this has been retained, a pair of globals has been introduced:
$PROBE_EXIST and $PROBE_SIZE (see `/usr/share/bsdconfig/media/common.subr')

The $PROBE_EXIST global can be used where you need the functionality of
simply testing for existence (previously the _only_ functionality).

Meanwhile, the new $PROBE_SIZE global can be used to cause the TYPE function
to print the size of the file (in bytes) on standard-out (or -1) if not
found or an error occurs. NOTE: If an error occurs, it is logged with the
dprintf function, which is visible with `-d' flag or debug=1.

In many cases, where you need to get the size of a file _and_ check for its
existence, you can use the return status of a $PROBE_SIZE call.
2013-07-14 03:08:52 +00:00
..
console Fix typos in the BSD License. 2013-07-07 18:51:44 +00:00
diskmgmt Fix typos in the BSD License. 2013-07-07 18:51:44 +00:00
docsinstall Fix typos in the BSD License. 2013-07-07 18:51:44 +00:00
dot Fix typos in the BSD License. 2013-07-07 18:51:44 +00:00
examples Oops, r252810 forgot to hook the new example file (browse_packages.sh) into 2013-07-05 18:50:17 +00:00
include Add the necessary code to uninstall packages (re-install still pending). 2013-07-05 06:52:07 +00:00
mouse Fix typos in the BSD License. 2013-07-07 18:51:44 +00:00
networking Fix typos in the BSD License. 2013-07-07 18:51:44 +00:00
packages Fix typos in the BSD License. 2013-07-07 18:51:44 +00:00
password Fix typos in the BSD License. 2013-07-07 18:51:44 +00:00
security Fix typos in the BSD License. 2013-07-07 18:51:44 +00:00
share Re-implement $probe_only aspect of f_media_get_TYPE() (where TYPE is cdrom, 2013-07-14 03:08:52 +00:00
startup Fix typos in the BSD License. 2013-07-07 18:51:44 +00:00
timezone Fix typos in the BSD License. 2013-07-07 18:51:44 +00:00
ttys Fix typos in the BSD License. 2013-07-07 18:51:44 +00:00
usermgmt Fix typos in the BSD License. 2013-07-07 18:51:44 +00:00
bsdconfig Check for INDEX file first before anything else when processing modules. 2013-07-05 22:25:40 +00:00
bsdconfig.8 Adhere to 80-column width. 2013-07-05 18:31:26 +00:00
Makefile Commit first portion of package module -- this includes the ability to view 2013-05-07 05:40:20 +00:00
USAGE Fix typos in the BSD License. 2013-07-07 18:51:44 +00:00