Skip to contentSkip to conversation

generated doc "Options" for dhcp command drops last line

DISCUSSION Robert P. J. Day 2 participants 3 messages Jul 6, 2014 – Jul 7, 2014

lore
Share & tools
lore
#0 lore raw

just noticed that the sphinx-generated doc page for the "dhcp"
command doesn't display the final line because of this in net/dhcp.c:

BAREBOX_CMD_HELP_START(dhcp)
BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT ("-H HOSTNAME", "hostname to send to the DHCP server") BAREBOX_CMD_HELP_OPT ("-v ID\t", "DHCP Vendor ID (code 60) submitted in DHCP requests") BAREBOX_CMD_HELP_OPT ("-c ID\t", "DHCP Client ID (code 61) submitted in DHCP requests") BAREBOX_CMD_HELP_OPT ("-u UUID\t", "DHCP Client UUID (code 97) submitted in DHCP requests") BAREBOX_CMD_HELP_OPT ("-U CLASS", "DHCP User class (code 77) submitted in DHCP requests") BAREBOX_CMD_HELP_OPT ("-r RETRY", "retry limit (default "__stringify(DHCP_DEFAULT_RETRY)")"); BAREBOX_CMD_HELP_END

it's that trailing semicolon on the second last line there, which i
suspect shouldn't be there, but if i take it out, the generated line now literally includes "__stringify(DHCP_DEFAULT_RETRY)”, and i'm not sure what to do about that, so if someone wants to fix it, go wild.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#1 lore raw
Quoted 14 lines · Robert P. J. Day

just noticed that the sphinx-generated doc page for the "dhcp"
command doesn't display the final line because of this in net/dhcp.c:

BAREBOX_CMD_HELP_START(dhcp)
BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT ("-H HOSTNAME", "hostname to send to the DHCP server") BAREBOX_CMD_HELP_OPT ("-v ID\t", "DHCP Vendor ID (code 60) submitted in DHCP requests") BAREBOX_CMD_HELP_OPT ("-c ID\t", "DHCP Client ID (code 61) submitted in DHCP requests") BAREBOX_CMD_HELP_OPT ("-u UUID\t", "DHCP Client UUID (code 97) submitted in DHCP requests") BAREBOX_CMD_HELP_OPT ("-U CLASS", "DHCP User class (code 77) submitted in DHCP requests") BAREBOX_CMD_HELP_OPT ("-r RETRY", "retry limit (default "__stringify(DHCP_DEFAULT_RETRY)")"); BAREBOX_CMD_HELP_END

Quoted 4 lines

it's that trailing semicolon on the second last line there, which i
suspect shouldn't be there, but if i take it out, the generated line now literally includes "__stringify(DHCP_DEFAULT_RETRY)”, and i'm not sure what to do about that, so if someone wants to fix it, go wild.

I assume that even with the semicolon the sphinx documentation doesn't have the correct value for the retry limit, right?

We should remove these macro tricks from the command documentation defines. In this special case DHCP_DEFAULT_RETRY isn't even configurable.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw
Quoted 16 lines · Sascha Hauer
Quoted 15 lines · Robert P. J. Day

just noticed that the sphinx-generated doc page for the "dhcp"
command doesn't display the final line because of this in net/dhcp.c:

BAREBOX_CMD_HELP_START(dhcp)
BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT ("-H HOSTNAME", "hostname to send to the DHCP server") BAREBOX_CMD_HELP_OPT ("-v ID\t", "DHCP Vendor ID (code 60) submitted in DHCP requests") BAREBOX_CMD_HELP_OPT ("-c ID\t", "DHCP Client ID (code 61) submitted in DHCP requests") BAREBOX_CMD_HELP_OPT ("-u UUID\t", "DHCP Client UUID (code 97) submitted in DHCP requests") BAREBOX_CMD_HELP_OPT ("-U CLASS", "DHCP User class (code 77) submitted in DHCP requests") BAREBOX_CMD_HELP_OPT ("-r RETRY", "retry limit (default "__stringify(DHCP_DEFAULT_RETRY)")"); BAREBOX_CMD_HELP_END

Quoted 8 lines
Quoted 5 lines

it's that trailing semicolon on the second last line there,
which i suspect shouldn't be there, but if i take it out, the generated line now literally includes "__stringify(DHCP_DEFAULT_RETRY)”, and i'm not sure what to do about that, so if someone wants to fix it, go wild.

I assume that even with the semicolon the sphinx documentation doesn't have the correct value for the retry limit, right?

right ... even after removing that semicolon so that the last line
shows up, it literally contains that "__stringify" stuff.

Quoted 3 lines

We should remove these macro tricks from the command documentation defines. In this special case DHCP_DEFAULT_RETRY isn't even configurable.

i'll let someone higher up the food chain decide how to resolve
that.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox