Opened 11 years ago

Closed 11 years ago

#2357 closed defect (fixed)

osm2pgsql -h -v doesn't work

Reported by: milo@… Owned by: jburgess777@…
Priority: major Milestone:
Component: utils Version:
Keywords: osm2pgsql Cc:


I discovered in source that when the -h or --help argument is detected, osm2pgsql executes

long_usage(argv[0]); exit(EXIT_FAILURE);

within the switch. This means that when the "verbose" argument is written on the commandline AFTER the -h or --help, it is ignored.

I have added a patch to solve this. The patch adds an integer long_usage_bool that is checked outside the switch, fires the long_usage() and uses the verbose variable if it is set.

Attachments (1)

osm2pgsql.patch (1.2 KB) - added by milo@… 11 years ago.
osm2pgsql patch for -h -v commandline arguments

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by milo@…

Attachment: osm2pgsql.patch added

osm2pgsql patch for -h -v commandline arguments

comment:1 Changed 11 years ago by Tom Hughes

Owner: changed from Tom Hughes to jburgess777@…

comment:2 Changed 11 years ago by jonb

Resolution: fixed
Status: newclosed

(In [18001]) Apply fix from Milo to display projection information when executed with: -h -v. Fixes #2357

Note: See TracTickets for help on using tickets.