summaryrefslogtreecommitdiff
path: root/util-linux/mdev.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix several problems with config parser:Denis Vlasenko2008-07-261-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a bug where it underflows the string a bug where it never frees parser_t struct make read_config() return 0 if parser is NULL, make config_close() accept and ignore NULL parser - eliminates many if() blocks reverse the sense of parser bit flags - negative flags are harder to grok. hexdump: revert the change to use config parser, it is BIGGER and also requires additional quirks in parser *: explicitly use PARSER_NORMAL instead of 0 function old new delta login_main 1575 1596 +21 config_close 18 29 +11 bbunpack 383 391 +8 qgravechar 106 109 +3 rtnl_tab_initialize 121 117 -4 expand 1697 1693 -4 man_main 717 712 -5 nameif_main 674 668 -6 hexdump_main 597 591 -6 read_config 217 209 -8 dnsd_main 1478 1470 -8 sysctl_main 203 189 -14 config_open2 44 25 -19 make_device 1177 1141 -36 config_read 597 549 -48 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/11 up/down: 43/-158) Total: -115 bytes
* mdev: do not complain if mdev.conf does not exist;Denis Vlasenko2008-07-261-138/+155
| | | | | | use #if to prevent gcc from generating dead code (sadly, it's more ugly this way)
* - unused variables if !ENABLE_FEATURE_MDEV_RENAME_REGEXPBernhard Reutner-Fischer2008-07-221-1/+4
|
* libbb: updated config_parse() from VladimirDenis Vlasenko2008-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | function old new delta config_read 385 460 +75 runsvdir_main 1701 1716 +15 readit 331 338 +7 passwd_main 1049 1053 +4 parse_command 1504 1507 +3 decode_format_string 822 824 +2 bb__parsespent 117 119 +2 udhcp_get_option 221 222 +1 changepath 196 194 -2 parse_inittab 400 396 -4 nameif_main 683 679 -4 make_device 1176 1172 -4 config_open 48 40 -8 expand_main 698 689 -9 readcmd 1012 1002 -10 config_free_data 37 21 -16 SynchronizeFile 683 643 -40 sleep_main 474 362 -112 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/10 up/down: 109/-209) Total: -100 bytes
* - fix segfault in nameif with mactab fileBernhard Reutner-Fischer2008-07-171-5/+5
| | | | | | | | | | | | | | | | | (by fixing and shrink config parser) function old new delta config_free_data - 37 +37 config_open 43 48 +5 pack_gzip 1658 1660 +2 nameif_main 527 525 -2 SynchronizeFile 629 623 -6 make_device 1184 1176 -8 config_close 31 18 -13 config_read 431 393 -38 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/5 up/down: 44/-67) Total: -23 bytes
* fix up callsites of config_read to check for >= 0Denis Vlasenko2008-07-161-1/+1
|
* mdev: support for serializing hotplugDenis Vlasenko2008-07-151-3/+28
| | | | | | function old new delta mdev_main 503 647 +144
* libbb: unified config parser (By Vladimir Dronnikov)Denis Vlasenko2008-07-151-56/+25
| | | | | | | | | | | | | | | | | | | | | | mdev: use it function old new delta config_read - 400 +400 config_open - 43 +43 config_close - 9 +9 qrealloc 33 36 +3 compare_keys 735 737 +2 xstrtoull_range_sfx 296 295 -1 qgravechar 109 106 -3 get_address 181 178 -3 next_token 928 923 -5 sv_main 1228 1222 -6 find_main 418 406 -12 next_field 32 - -32 make_device 1269 1184 -85 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 2/7 up/down: 457/-147) Total: 310 bytes
* mdev: check for "/block/" substring for block dev detectionDenis Vlasenko2008-07-121-7/+5
| | | | | | function old new delta make_device 1294 1269 -25
* mdev: if device was moved at creation, at removal coreectly removeDenis Vlasenko2008-07-121-19/+37
| | | | | | | | | | | | it from moved location and also remove symlinks to it function old new delta build_alias - 78 +78 mdev_main 505 503 -2 make_device 1300 1294 -6 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 78/-8) Total: 70 bytes
* mdev: reinstate "follow symlinks" flag, this time with explanationDenis Vlasenko2008-07-061-4/+7
|
* mdev: do not follow symlinks in /sys (as was intended prior to rev 18811).Denis Vlasenko2008-07-061-5/+12
| | | | | | | | | | | | | If this breaks things, please document why! mdev,init: use shared code for fd sanitization function old new delta bb_daemonize_or_rexec 155 172 +17 mdev_main 500 505 +5 init_main 907 856 -51 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 22/-51) Total: -29 bytes
* *: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko2008-07-051-5/+5
|
* *: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko2008-06-271-2/+2
| | | | | | | text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
* whitespace fixes. no code changesDenis Vlasenko2008-06-251-6/+6
|
* mdev: add commented-out debug code to open stdio.Denis Vlasenko2008-05-311-0/+9
|
* mdev: fix counting of '%' in patternDenis Vlasenko2008-05-241-2/+3
|
* mdev: fix whitespace damageDenis Vlasenko2008-05-231-1/+1
|
* mdev: suppress "may be used uninitialized" warningDenis Vlasenko2008-05-221-5/+6
|
* mdev: add support for "only rename" option in mdev.confDenis Vlasenko2008-05-221-3/+5
|
* more -Wall warning fixes from Cristian Ionescu-Idbohrn.Denis Vlasenko2008-05-131-1/+4
| | | | | | | | | | | | | This time it resulted in small code changes: function old new delta nexpr 820 828 +8 tail_main 1200 1202 +2 wrapf 166 167 +1 parse_mount_options 227 209 -18 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 11/-18) Total: -7 bytes
* mdev: /sys/class/block/ are also block devicesDenis Vlasenko2008-05-081-2/+8
| | | | | | function old new delta make_device 1200 1221 +21
* mdev: fix a bug where we were eating argv[0] of helperDenis Vlasenko2008-05-021-30/+32
|
* whitespace fixes. no code changesDenis Vlasenko2008-04-221-1/+1
|
* mdev: optional support for regex pattern group substitution.Denis Vlasenko2008-03-291-3/+41
| | | | | +142 bytes.
* mdev: fix block/char device detection. Closes bug 2144.Denis Vlasenko2008-03-291-1/+3
|
* mdev: fix "foo 0:0 444 >bar/baz" rule handling. make_device() +23 bytesDenis Vlasenko2008-03-291-11/+16
|
* mdev: fix a bug where it was not stopping on first matching ruleDenis Vlasenko2008-03-291-109/+99
| | | | | | | | | | | | (testsuite entry added). Revamped line parsing while at it. function old new delta next_field - 36 +36 make_device 1104 1022 -82 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 36/-82) Total: -46 bytes
* mdev: plug a few memory and fd leaks; simplify code a bitDenis Vlasenko2008-03-271-71/+69
|
* *: more uniform naming: s/xmalloc_getline/xmalloc_fgetline/Denis Vlasenko2008-03-261-1/+1
|
* *: add -Wunused-parameter; fix resulting breakageDenis Vlasenko2008-03-171-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
* [#1334] exec script for devices even if they dont have device nodesMike Frysinger2008-02-201-4/+14
|
* libbb: introduce and use xrename and rename_or_warn.Denis Vlasenko2008-02-171-1/+1
|
* add support for renaming/relocating device nodesMike Frysinger2008-02-011-5/+43
|
* as reported by George Boudreau, make sure we properly skip blank linesMike Frysinger2008-01-231-2/+6
|
* fix buglets found by randomconfigDenis Vlasenko2007-12-211-2/+2
|
* cleanup comments and coding style and rewrite the mdev.conf parser to use ↵Mike Frysinger2007-11-191-95/+98
| | | | common busybox functions and call strdup() less often ... saves a ~few hundred bytes
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* trylink: produce even more info about final link stageDenis Vlasenko2007-08-121-1/+1
| | | | | | | | | trylink: explain how to modify link and drastically decrease amount of padding (unfortunately, needs hand editing ATM). *: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts size saving: 0.5k
* introduce and use bb_basename()Denis Vlasenko2007-06-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta bb_basename - 26 +26 sv_main 1226 1225 -1 passwd_main 1985 1983 -2 showdirs 482 478 -4 sendCgi 1811 1807 -4 make_device 1354 1350 -4 handleIncoming 2443 2439 -4 func_name 82 78 -4 service_name 2292 2285 -7 main 909 901 -8 cmp_main 555 547 -8 test_main 434 422 -12 act 228 216 -12 find_pair 180 164 -16 rmmod_main 298 280 -18 find_pid_by_name 156 134 -22 modprobe_main 1606 1576 -30 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/16 up/down: 26/-156) Total: -130 bytes text data bss dec hex filename 734933 3028 14400 752361 b7ae9 busybox_old 734801 3028 14400 752229 b7a65 busybox_unstripped
* - strndupa is a GNU extension. Using strdup to avoid several errors like:Bernhard Reutner-Fischer2007-06-201-3/+8
| | | | util-linux/mdev.c:(.text+0x29a): undefined reference to `strndupa'
* Alex Landau writes: open firmware for reading, not writingMike Frysinger2007-06-141-1/+1
|
* as suggested by Renaud Cerrato and Souf, switch over to recursive_action() ↵Mike Frysinger2007-06-131-32/+27
| | | | for some nice shrinkage and so we work even when CONFIG_SYSFS_DEPRECATED is off
* add support for firmware loadingMike Frysinger2007-06-131-2/+73
|
* mdev: microscopic enhancement, should change nothingDenis Vlasenko2007-06-081-8/+6
|
* find_stray_communal_vars: script which finds communal variablesDenis Vlasenko2007-06-031-11/+9
| | | | | resize: remove globals var mdev: remove globals var
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* - sed -e "s/char[[:space:]]*\*[[:space:]]*argv\[\]/char **argv/g"Bernhard Reutner-Fischer2007-04-041-2/+2
|
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* preparatory patch for -Wwrite-strings #2Denis Vlasenko2007-01-291-1/+2
|