call fflush after every output line in the webif translator and add some fixes for...
authorFelix Fietkau <nbd@openwrt.org>
Wed, 8 Feb 2006 21:16:49 +0000 (21:16 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 8 Feb 2006 21:16:49 +0000 (21:16 +0000)
SVN-Revision: 3195

openwrt/package/webif/files/www/cgi-bin/webif/upgrade.sh
openwrt/package/webif/src/webif-page.c

index f5a2f1ae70a7f8e0491538a99c1089b5c9a49d74..c27be439b05fa2fd85f2c4f57f8451d327aff6a7 100755 (executable)
@@ -22,7 +22,7 @@ empty "$FORM_submit" || empty "$FORM_firmware" || {
                                        UPGRADE=1
                                ;;
                                57353447|57353453|57353473) # WRT54G(S)
-                                       echo "@TR<<Firmware format>>: Cybertan BIN =&lt; @TR<<converting...>> "
+                                       echo "@TR<<Firmware format>>: Cybertan BIN =&gt; @TR<<converting...>> "
                                        strip_cybertan
                                        echo "@TR<<done>>. <br />"
                                        UPGRADE=1
@@ -45,7 +45,7 @@ empty "$FORM_submit" || empty "$FORM_firmware" || {
                <tr>
                        <td>@TR<<Options>>:</td>
                        <td>
-                               <input type="checkbox" name="erase_fs" value="1" checked="checked" />@TR<<Erase_JFFS2|Erase JFFS2 partition>><br />
+                               <input type="checkbox" name="erase_fs" value="1" />@TR<<Erase_JFFS2|Erase JFFS2 partition>><br />
                                <input type="checkbox" name="erase_nvram" value="1" />@TR<<Erase NVRAM>>
                        </td>
                </tr>
@@ -66,7 +66,7 @@ empty "$FORM_submit" || empty "$FORM_firmware" || {
        ERASE="${FORM_erase_fs:+-e linux }"
        ERASE="$ERASE${FORM_erase_nvram:+-e nvram }"
        cp /bin/busybox /tmp/
-       echo -n '@TR<<Upgrading...>> '
+       echo '@TR<<Upgrading...>>'
        # FIXME: probably a race condition (with the reboot), but it seems to work
        mtd -r $ERASE write /tmp/upgrade.bin linux 2>&- | awk 'END { print "@TR<<done>>." }'
        exit
index fd6f6e1280dbfa90e109c273d2f19e6dd7908912..9d0222f6fa16fd78efc1bdb43d218db7150a82ad 100644 (file)
@@ -240,6 +240,7 @@ nomatch:
        
        while (!feof(f) && (fgets(buf, LINE_BUF - 1, f)) != NULL) {
                fprintf(stdout, "%s", translate_line(buf));
+               fflush(stdout);
        }
        
        return 0;