Notes |
(0002616)
vda
07-21-07 07:41
|
424897 byte source is 2.5 larger that our current biggest applet, ash.c. Sorry. |
| |
(0002617)
vda
07-21-07 07:42
|
Oops. make that 1.5 times larger. But still far too big. Just build it standalone. |
| |
(0002623)
mirabilos
07-21-07 09:10
|
I don't think "too big" is an issue since the user still has to
select it manually. |
| |
(0002625)
vda
07-21-07 16:30
|
If applet is added to bbox, its quality becomes responsibility of bbox maintainers. Low-quality code taken into the tree tends to sit there forever with nobody fixing it.
Patch review and inclusion is _the_ point where code is cleaned up and slimmed down.
Random examples of bugs:
+ lists_dir=(char *)malloc(1);
+ lists_dir[0]='\0';
bloaty code:
+ line = realloc(line, line_size);
+ if (line == NULL) {
+ fprintf(stderr, "%s: out of memory\n", __FUNCTION__);
+ break;
+ }
and bad style:
+ }
+ if (( strcmp(flags,"hold")==0)||( strcmp(flags,"noprune")==0)||
+ ( strcmp(flags,"user")==0)||( strcmp(flags,"ok")==0)) {
+ pkg->state_flag = pkg_state_flag_from_str(flags);
+ }
+/* pb_ asked this feature 03292004 */
+/* Actually I will use only this two, but this is an open for various status */
+ if (( strcmp(flags,"installed")==0)||( strcmp(flags,"unpacked")==0)){
+ pkg->state_status = pkg_state_status_from_str(flags);
+ }
+ ipkg_state_changed++;
+ ipkg_message(conf, IPKG_NOTICE,
+ "Setting flags for package %s to %s\n",
+ pkg->name, flags);
+ } |
| |
(0002627)
mirabilos
07-23-07 02:57
|
While I agree that the bugs should be fixed, this is
exactly why I'm submitting the patches to you (plus
making sure it won't break due to future busybox
changes). I don't even know its original authors,
but I surely won't object against bugs being fixed. |
| |
(0002634)
bernhardf
07-23-07 05:26
|
Also, the long option handling has to depend on ENABLE_GETOPT_LONG.
Can you please adjust accordingly (including vda's comments) and run this through the mailing-list? TIA.
PS: You should use index_in_string_array rather than all those strcmp() chains.
PPS: The most of struct args should be bools and not int's |
| |
(0004464)
vda
02-13-08 08:59
|
Reporter is not responding. Anyway, new applets are to be sent to mailing list. |
| |