git: sbin/hammer: Remove meaningless sscanf for "@@PFS%d" format
tkusumi at crater.dragonflybsd.org
Thu Oct 6 14:28:58 PDT 2016
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date: Wed Sep 21 10:48:39 2016 +0900
sbin/hammer: Remove meaningless sscanf for "@@PFS%d" format
This isn't necessary as userspace never reads "@@PFS%d" via readlink(2).
"@@%jx:%d" covers all the necessary patterns.
It also shouldn't be here because the first stat(2) call in this
function ignores the result due to possible slave PFS (before once
synced with a master PFS), so an arbitrary string that matches this
"@@PFS%d" pattern for path argument (whether it really exists or not)
makes this function return non negative fd while it should return -1.
If "@@PFS%d" is the name of an existing file or a directory, then
that's also not what this function is looking for, so it can still
Summary of changes:
sbin/hammer/cmd_pfs.c | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
DragonFly BSD source repository
More information about the Commits