This patch modifies the hwtstamp_ctl program, so that it will (attempt
to) use the SIOCGHWTSTAMP ioctl to non-destructively read the current
hardware timestamping policy, prior to setting it with SIOCSHWTSTAMP.
This change has 3 primary advantages:
1) It allows reading the current settings of the device, which was
previously not possible since SIOCSHWTSTAMP is destructive.
2) The default behavior without rx-filter or tx-type selected on the
command line is no longer destructive, since it does not attempt to
set the values to 0. The user must explicitly request to disable the
settings, by using the provided options.
3) It allows only modifying tx-type or rx-filter separately, without
destroying the other setting.
This patch supersedes a previous submission which added a -g flag. This
new method of getting first is more advantageous and doesn't require
adding an additional option flag.
- v4
* only display results if command succeeds, as the contents are otherwise
expected to be identical to what we passed in.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>