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
..
2013-03-17 06:54:04 +00:00
2013-07-10 07:40:30 +00:00
2013-05-12 22:22:12 +00:00
2012-10-07 19:53:04 +00:00
2013-05-10 16:41:26 +00:00
2012-11-20 02:12:01 +00:00
2012-07-13 21:27:18 +00:00
2012-03-26 21:22:53 +00:00
2012-03-26 15:18:14 +00:00
2013-05-12 22:22:12 +00:00
2013-06-05 21:56:29 +00:00
2012-09-01 10:56:15 +00:00
2010-12-20 08:54:30 +00:00
2013-04-11 18:46:41 +00:00
2012-05-17 11:50:12 +00:00
2013-06-29 15:58:03 +00:00
2010-12-20 09:36:54 +00:00
2012-07-04 10:17:02 +00:00
2012-05-12 15:08:22 +00:00
2013-06-08 23:48:13 +00:00
2012-11-18 16:58:08 +00:00
2012-09-11 07:35:24 +00:00
2013-07-09 07:08:36 +00:00
2013-05-28 13:54:26 +00:00
2013-04-11 18:46:41 +00:00
2012-06-03 11:29:48 +00:00
2013-07-07 18:51:44 +00:00
2013-04-22 18:31:39 +00:00
2013-05-13 18:13:50 +00:00
2013-05-12 22:22:12 +00:00
2012-03-10 14:38:34 +00:00
2013-04-08 08:05:15 +00:00
2012-03-26 21:22:53 +00:00
2013-07-04 21:12:58 +00:00