Jan Weitzel
0a28ada177
tftp return value
...
tftp returns transfered bytes on success and 1 in error case. Bad for
scripting. Change to 0 on success
Signed-off-by: Jan Weitzel <J.Weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-04-14 10:13:07 +02:00
Sascha Hauer
42f4ca1c85
put only once used function inline
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:25:32 +01:00
Sascha Hauer
8f0d0f25ed
replace ET_DEBUG with pr_debug
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:25:32 +01:00
Sascha Hauer
922bb41a47
remove typedef cmd_tbl_t and replace it with struct command
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:25:32 +01:00
Sascha Hauer
88351d2e4b
Move tftp/nfs specific code to net/*
...
This adds a few bytes of binary space but is done to put
the code where it belongs to.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:25:31 +01:00
Sascha Hauer
426de4405c
remove unused NETCONSOLE stuff
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:25:31 +01:00
Sascha Hauer
a3ffa97f40
rename U-Boot-v2 project to barebox
...
This has been done with the following script:
find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \
-e 's/u2boot/barebox/g' \
-e 's/U2Boot/barebox/g' \
-e 's/U-boot V2/barebox/g' \
-e 's/u-boot v2/barebox/g' \
-e 's/U-Boot V2/barebox/g' \
-e 's/U-Boot-v2/barebox/g' \
-e 's/U_BOOT/BAREBOX/g' \
-e 's/UBOOT/BAREBOX/g' \
-e 's/uboot/barebox/g' \
-e 's/u-boot/barebox/g' \
-e 's/u_boot/barebox/g' \
-e 's/U-Boot/barebox/g' \
-e 's/U-boot/barebox/g' \
-e 's/U-BOOT/barebox/g'
find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \
xargs -0 -r rename 's/u[-_]?boot/barebox/'
It needs some manual fixup following in the next patch
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 10:18:30 +01:00
Sascha Hauer
420a3173f0
commands: remove maxargs
...
No need to check for maximum argument counts. The commands are
safe to be called with more arguments, so lets safe some bytes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-19 16:18:33 +02:00
Sascha Hauer
87e01f28cc
commands: return COMMAND_ERROR_USAGE
...
instead of calling u_boot_cmd_usage in each command to safe
space.
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:52 +02:00
Sascha Hauer
2dc2132f0e
remove global variable BootFile
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:51 +02:00
Sascha Hauer
d78105a55b
nfs: allow only serverip
...
Do not allow to pass serverip via commandline.
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:51 +02:00
Sascha Hauer
ac50a05caf
pass filename to nfs and tftp start functions
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:51 +02:00
Sascha Hauer
1d3d2c6369
nfs: no default filename, we always have a filename
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:51 +02:00
Sascha Hauer
c229f67efb
ping: shorten usage info
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:51 +02:00
Sascha Hauer
3701ed81ec
ping: do not return -1 in command
...
Also, print usage if not enough arguments given.
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:51 +02:00
Sascha Hauer
feb58df760
tftp: use debug macro
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:51 +02:00
Sascha Hauer
e225e4fcdd
tftp: coding style
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:51 +02:00
Sascha Hauer
ef2787ab26
tftp: reorder to get rid of static function declarations
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:36 +02:00
Sascha Hauer
4aedcf8531
tftp: remove never reached state STATE_BAD_MAGIC
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-17 09:18:49 +02:00
Sascha Hauer
8aab890453
tftp: remove never reached state STATE_TOO_LARGE
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-17 09:17:47 +02:00
Sascha Hauer
8cef3301f8
tftp: remove volatile from variables
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-17 09:15:35 +02:00
Sascha Hauer
e8b856dc03
remove unused code
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-17 09:10:39 +02:00
Sascha Hauer
fdc9bd236e
tftp: consolidate different puts to printf
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-17 09:10:09 +02:00
Sascha Hauer
3830d35bc6
tftp: remove unnecessary gateway information
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-17 09:07:41 +02:00
Sascha Hauer
a5f301fb7a
remove unused variable NetBootFileSize
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-17 08:54:57 +02:00
Sascha Hauer
551d088687
tftp: remove default filename. We always have a filename given
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-17 08:49:45 +02:00
Sascha Hauer
e2c2954654
make locally used funtion static
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-17 08:38:59 +02:00
Sascha Hauer
146f9b6e5b
remove sntp support. Has been broken for long enough
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 11:19:28 +02:00
Sascha Hauer
4ad31ee437
do not abuse the received packet to send back another packet
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 11:02:15 +02:00
Sascha Hauer
6289b5a51d
net: remove unnecessary if
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 11:02:15 +02:00
Sascha Hauer
faa61661cf
only the ping code is interested in the ping ip
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 11:02:15 +02:00
Sascha Hauer
5619409df6
net: remove dead code
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 11:02:15 +02:00
Sascha Hauer
4d0670f227
net: cleanup header file
...
move contents of bootp.h to .c file and remove it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 11:02:15 +02:00
Sascha Hauer
87048e4a66
rename bootp.c to dhcp.c
2009-10-13 11:02:15 +02:00
Sascha Hauer
211f9b336a
net: refactor dhcp support
...
Remove bootp support. It has been broken for longer and
is implemented in an ifdef desert.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 11:02:08 +02:00
Sascha Hauer
cf1a0b21c3
ping.c: refactor
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:57:41 +02:00
Sascha Hauer
a3a5927110
net: remove switch/case in NetLoop()
...
Instead of having a big switch/case for every protocol, do
the right things in the individual functions before callong
NetLoop().
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:57:40 +02:00
Sascha Hauer
8fe37b4e2e
bootp: remove unnecessary counter
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:57:40 +02:00
Sascha Hauer
f787f8fbf7
net: check prerequisites in NetLoopIinit()
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:57:40 +02:00
Sascha Hauer
c227c646e3
return is not a function
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:54:14 +02:00
Sascha Hauer
9296260a78
net: split NetLoop in NetLoop and NetLoopInit
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:49:21 +02:00
Sascha Hauer
3487f1ee8e
net: remove unused state NETLOOP_RESTART
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:48:56 +02:00
Sascha Hauer
5e29712041
net: remove NetStartAgain()
...
Do not let the network stack restart itself
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:48:32 +02:00
Sascha Hauer
eedb766979
tftp: do not call NetStartAgain()
...
When we are in the middle of transferring a file it does
not make sense to restart the transfer because we may
transfer directly to flash in which case we would have
to erase the flash prior to attempting again.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:47:12 +02:00
Sascha Hauer
2f8df2a003
add a device_d to ethernet devices
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:46 +02:00
Sascha Hauer
bac65c6cde
net: Get rid of DEVICE_TYPE_ETHER usage
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:45 +02:00
Sascha Hauer
2230eea29b
net: add eth_unregister function
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-04-07 10:42:33 +02:00
Sascha Hauer
f9dccf98a3
eth.c: Fix return values
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-04-06 11:16:13 +02:00
Sascha Hauer
53488058e6
allow changing of network device
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-04-06 11:13:19 +02:00
fredo
56d80fe843
remove unused variable
...
Signed-off-by: Frederic RODO <fred.rodo@gmail.com>
2008-12-18 14:20:08 +01:00