Page MenuHomeFreeBSD

Emit a deprecation warning when mounting a device to print statisistics.
ClosedPublic

Authored by brooks on Dec 14 2016, 10:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 7:32 PM
Unknown Object (File)
Thu, Apr 25, 3:45 AM
Unknown Object (File)
Thu, Apr 25, 3:44 AM
Unknown Object (File)
Thu, Apr 25, 3:44 AM
Unknown Object (File)
Thu, Apr 25, 3:43 AM
Unknown Object (File)
Thu, Apr 25, 3:39 AM
Unknown Object (File)
Mon, Apr 22, 4:02 AM
Unknown Object (File)
Thu, Apr 18, 1:04 PM

Details

Summary

While this feature is long standing, it is undocumented, fails to
follow the unix philosophy, and is easily scripted.

The warning will be merged to FreeBSD 11 along with recent improvemnts
and the feature will be removed from HEAD before FreeBSD 12.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

brooks retitled this revision from to Emit a deprecation warning when mounting a device to print statisistics..
brooks updated this object.
brooks edited the test plan for this revision. (Show Details)
brooks added a reviewer: cem.
bin/df/df.c
264 ↗(On Diff #22934)

Why not move this much earlier after if (S_ISCHR())?

  • Move the warning earlier and use xo_warnx().
cem edited edge metadata.

LGTM, however, this made me realize that the #ifdef MOUNT_CHAR_DEVS is actually in the wrong place (I think).

If (mntpt = getmntpt(*argv)) != NULL, the device is already mounted and we fall out the bottom and stat normally. So the #ifdef should only cover the == NULL part. (I think the #endif may actually be in the right place, just the #if is misplaced.)

This revision is now accepted and ready to land.Dec 14 2016, 10:58 PM

Correct the location of MOUNT_CHAR_DEVS and emit better errors.

This revision now requires review to proceed.Feb 8 2018, 10:40 PM

I hate to see more libxo enter programs, but the functional change looks good.

This revision is now accepted and ready to land.Feb 9 2018, 4:38 AM
This revision was automatically updated to reflect the committed changes.

I reported on this deprecated element core dumping ( https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237368 )

As it was scheduled to be removed before 12 away, maybe it could be actioned now?

Cheers