Bug 588322 - fuser'ing a non-existent file yields two error messages
Summary: fuser'ing a non-existent file yields two error messages
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: psmisc (Show other bugs)
(Show other bugs)
Version: 11
Hardware: All Linux
low
low
Target Milestone: ---
Assignee: Daniel Novotny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-03 13:34 UTC by Tim Landscheidt
Modified: 2010-05-18 12:21 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-18 12:21:56 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed patch (683 bytes, patch)
2010-05-05 11:46 UTC, Daniel Novotny
no flags Details | Diff

Description Tim Landscheidt 2010-05-03 13:34:40 UTC
Description of problem:

When "fuser $NOTEXIST", fuser prints out two identical messages saying that it couldn't stat the file. This is at least confusing and should either be condensed to one message or the messages should be expanded (see below).


Version-Release number of selected component (if applicable):

psmisc-22.6-9.fc11.i586


How reproducible:

Always.


Steps to Reproduce:

1. "fuser doesnotex.ist"

  
Actual results:

| [tim@passepartout ~]$ fuser doesnotex.ist
| Cannot stat doesnotex.ist: Datei oder Verzeichnis nicht gefunden
| Cannot stat doesnotex.ist: Datei oder Verzeichnis nicht gefunden
| [tim@passepartout ~]$


Expected results:

Either one message or a more detailed explanation (see below).


Additional info:

The first line stems from fuser.c:333 (parse_*file* ()), the second from fuser.c:352 (parse_*unixsockets* ()). I'd assume that they should be exclusive to each other in some way.

Comment 1 Daniel Novotny 2010-05-05 11:46:52 UTC
Created attachment 411555 [details]
proposed patch

a patch: when the first stat fails, we will not do the other one

Comment 2 Tim Landscheidt 2010-05-05 21:29:50 UTC
The patch works for me, thanks; still, the "relationship" between parse_file () and parse_unixsockets () seems very clumsy though.

Comment 3 Daniel Novotny 2010-05-18 12:21:56 UTC
fixed in rawhide: psmisc-22.6-14.fc14


Note You need to log in before you can comment on or make changes to this bug.