Bug 181874 - nash: fix findCommand
nash: fix findCommand
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-17 07:27 EST by Mark McLoughlin
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-22 13:03:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
mkinitrd-fix-find-command.patch (787 bytes, patch)
2006-02-17 07:27 EST, Mark McLoughlin
no flags Details | Diff
mkinitrd-fix-find-command.patch (783 bytes, patch)
2006-02-17 07:31 EST, Mark McLoughlin
no flags Details | Diff

  None (edit)
Description Mark McLoughlin 2006-02-17 07:27:42 EST
Discovered while debugging bug #181873

Argument parsing in findCommand() is a little broken. This doesn't work:

  find /dev

It incorrectly thinks that the lines following the command are arguments and
then barfs when it realizes they arent.
Comment 1 Mark McLoughlin 2006-02-17 07:27:43 EST
Created attachment 124809 [details]
mkinitrd-fix-find-command.patch
Comment 2 Mark McLoughlin 2006-02-17 07:31:34 EST
Created attachment 124812 [details]
mkinitrd-fix-find-command.patch

Fixed indentation
Comment 3 Mark McLoughlin 2006-02-21 08:39:51 EST
Without patch:

  $> cat > /tmp/t.sh << EOF
  nash-find /dev
  foo
  $> nash /tmp/t.sh
  (running in test mode).
  Red Hat nash version  starting
  usage: find [-type type] [path [-name file]]

Works with patch

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