Bug 181874 - nash: fix findCommand
Summary: nash: fix findCommand
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mkinitrd
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Peter Jones
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-02-17 12:27 UTC by Mark McLoughlin
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-22 18:03:10 UTC
Type: ---
Embargoed:


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

Description Mark McLoughlin 2006-02-17 12:27:42 UTC
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 12:27:43 UTC
Created attachment 124809 [details]
mkinitrd-fix-find-command.patch

Comment 2 Mark McLoughlin 2006-02-17 12:31:34 UTC
Created attachment 124812 [details]
mkinitrd-fix-find-command.patch

Fixed indentation

Comment 3 Mark McLoughlin 2006-02-21 13:39:51 UTC
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.