libcmdline.git
13 years agocmdline: use a macro for maximum token size
Olivier Matz [Sun, 2 Jan 2011 18:44:04 +0000 (19:44 +0100)]
cmdline: use a macro for maximum token size

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
13 years agocmdline: allow quoted strings
Olivier Matz [Tue, 28 Dec 2010 22:49:35 +0000 (23:49 +0100)]
cmdline: allow quoted strings

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
13 years agocmdline: rename return values of vt100
Olivier Matz [Sat, 25 Dec 2010 18:11:36 +0000 (19:11 +0100)]
cmdline: rename return values of vt100

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
13 years agocmdline: fix prototype of cmdline_tcpv6_listen() in header
Olivier Matz [Sat, 25 Dec 2010 17:47:09 +0000 (18:47 +0100)]
cmdline: fix prototype of cmdline_tcpv6_listen() in header

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
13 years agogenconf: fix dotconfig_write methods
Olivier Matz [Fri, 24 Dec 2010 12:16:18 +0000 (13:16 +0100)]
genconf: fix dotconfig_write methods

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
13 years agogenconf: a menu confnode is always enabled
Olivier Matz [Fri, 24 Dec 2010 12:16:02 +0000 (13:16 +0100)]
genconf: a menu confnode is always enabled

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
13 years agogenconf: properly read the value of the "if" node
Olivier Matz [Fri, 24 Dec 2010 12:15:30 +0000 (13:15 +0100)]
genconf: properly read the value of the "if" node

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
13 years agogenconf: in choice node, when value is "", it means no value
Olivier Matz [Fri, 24 Dec 2010 12:14:56 +0000 (13:14 +0100)]
genconf: in choice node, when value is "", it means no value

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
13 years agogenconf: take quote in account in confnode_set_user_strvalue()
Olivier Matz [Fri, 24 Dec 2010 12:14:10 +0000 (13:14 +0100)]
genconf: take quote in account in confnode_set_user_strvalue()

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
13 years agogenconf: enhance short and long display of confnodes
Olivier Matz [Fri, 24 Dec 2010 12:13:25 +0000 (13:13 +0100)]
genconf: enhance short and long display of confnodes

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
13 years agogenconf: fix path display (no slash at the end)
Olivier Matz [Fri, 24 Dec 2010 12:10:13 +0000 (13:10 +0100)]
genconf: fix path display (no slash at the end)

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
13 years agogenconf: properly check retval of confnode_strvalue_to_boolvalue()
Olivier Matz [Fri, 24 Dec 2010 12:05:16 +0000 (13:05 +0100)]
genconf: properly check retval of confnode_strvalue_to_boolvalue()

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
13 years agogenconf: enable long and short display of nodes
Olivier Matz [Fri, 24 Dec 2010 11:46:36 +0000 (12:46 +0100)]
genconf: enable long and short display of nodes

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
13 years agogenconf: typo and comments
Olivier Matz [Fri, 24 Dec 2010 11:46:17 +0000 (12:46 +0100)]
genconf: typo and comments

13 years agocmdline: support parsing of 64-bit values
Olivier Matz [Sun, 2 Jan 2011 20:34:00 +0000 (21:34 +0100)]
cmdline: support parsing of 64-bit values

Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
13 years agocmdline (merge-intel): don't free the cmdline struct in cmdline_interact()
Olivier Matz [Fri, 24 Dec 2010 12:56:30 +0000 (13:56 +0100)]
cmdline (merge-intel): don't free the cmdline struct in cmdline_interact()

This function is not supposed to free the 'cl' structure, as it may
be reused by cmdline_stdin_exit().

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): fix format string in snprintf()
Olivier Matz [Fri, 24 Dec 2010 12:56:26 +0000 (13:56 +0100)]
cmdline (merge-intel): fix format string in snprintf()

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): add new bindings; ctrl-p, ctrl-n, alt-d
Olivier Matz [Fri, 24 Dec 2010 12:56:21 +0000 (13:56 +0100)]
cmdline (merge-intel): add new bindings; ctrl-p, ctrl-n, alt-d

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): fix warnings when compiing with -D_FORTIFY_SOURCE=2
Olivier Matz [Fri, 24 Dec 2010 12:56:16 +0000 (13:56 +0100)]
cmdline (merge-intel): fix warnings when compiing with -D_FORTIFY_SOURCE=2

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): don't limit output len of cmdline_printf()
Olivier Matz [Fri, 24 Dec 2010 12:56:06 +0000 (13:56 +0100)]
cmdline (merge-intel): don't limit output len of cmdline_printf()

It was using a big buffer in stack. Now use vdprintf() if _GNU_SOURCE
is defined, or a malloc + free if not.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): reverse compilation flags for floats and socket
Olivier Matz [Fri, 24 Dec 2010 12:55:43 +0000 (13:55 +0100)]
cmdline (merge-intel): reverse compilation flags for floats and socket

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): support ctrl-w in librte_cmdline
Olivier Matz [Fri, 24 Dec 2010 12:55:33 +0000 (13:55 +0100)]
cmdline (merge-intel): support ctrl-w in librte_cmdline

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): fix display of last char when using backspace
Olivier Matz [Fri, 24 Dec 2010 12:55:28 +0000 (13:55 +0100)]
cmdline (merge-intel): fix display of last char when using backspace

This was introduced by previous commit on this file.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): don't display control character at the end of line
Olivier Matz [Fri, 24 Dec 2010 12:55:19 +0000 (13:55 +0100)]
cmdline (merge-intel): don't display control character at the end of line

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): add cmdline_quit()
Olivier Matz [Fri, 24 Dec 2010 12:55:04 +0000 (13:55 +0100)]
cmdline (merge-intel): add cmdline_quit()

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): cosmetic fixes, conform to coding rules
Olivier Matz [Fri, 24 Dec 2010 12:54:37 +0000 (13:54 +0100)]
cmdline (merge-intel): cosmetic fixes, conform to coding rules

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): remove duplicated definitions of vt100 codes
Olivier Matz [Fri, 24 Dec 2010 12:54:34 +0000 (13:54 +0100)]
cmdline (merge-intel): remove duplicated definitions of vt100 codes

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): replace harcoded return values with defines
Olivier Matz [Fri, 24 Dec 2010 12:54:31 +0000 (13:54 +0100)]
cmdline (merge-intel): replace harcoded return values with defines

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): move basic_char_loop() in cmdline lib, as cmdline_interact()
Olivier Matz [Fri, 24 Dec 2010 12:54:25 +0000 (13:54 +0100)]
cmdline (merge-intel): move basic_char_loop() in cmdline lib, as cmdline_interact()

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): fix compilation with icc
Olivier Matz [Fri, 24 Dec 2010 12:54:22 +0000 (13:54 +0100)]
cmdline (merge-intel): fix compilation with icc

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): compilation under baremetal environment
Olivier Matz [Fri, 24 Dec 2010 12:54:19 +0000 (13:54 +0100)]
cmdline (merge-intel): compilation under baremetal environment

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): add intel licences
Olivier Matz [Fri, 24 Dec 2010 12:53:59 +0000 (13:53 +0100)]
cmdline (merge-intel): add intel licences

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): use maximum int values defines from stdint.h
Olivier Matz [Fri, 24 Dec 2010 12:53:20 +0000 (13:53 +0100)]
cmdline (merge-intel): use maximum int values defines from stdint.h

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): cmdline: disable float parsing
Olivier Matz [Fri, 24 Dec 2010 12:53:16 +0000 (13:53 +0100)]
cmdline (merge-intel): cmdline: disable float parsing

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): fix compilation warnings
Olivier Matz [Fri, 24 Dec 2010 12:52:49 +0000 (13:52 +0100)]
cmdline (merge-intel): fix compilation warnings

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agocmdline (merge-intel): fix whitespaces
Olivier Matz [Fri, 24 Dec 2010 12:52:24 +0000 (13:52 +0100)]
cmdline (merge-intel): fix whitespaces

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
13 years agoInitial import from http://www.droids-corp.org/hg/libcmdline/rev/db316e4289a1
Olivier Matz [Fri, 24 Dec 2010 11:35:58 +0000 (12:35 +0100)]
Initial import from droids-corp.org/hg/libcmdline/rev/db316e4289a1

Signed-off-by: Olivier Matz <zer0@droids-corp.org>