diff options
author | Fritz Elfert <felfert@to.com> | 2002-03-20 02:18:51 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2002-03-20 02:18:51 +0000 |
commit | 1d9b2e0e156f9a58bd642b9f9e8b2a08e768f5ed (patch) | |
tree | 580f6fa06ce0d114f3861c709203af4c3d86237a /plpftp | |
parent | bedd0177bc1ec1bf3c425e034958209554c20171 (diff) | |
download | plptools-1d9b2e0e156f9a58bd642b9f9e8b2a08e768f5ed.tar.gz plptools-1d9b2e0e156f9a58bd642b9f9e8b2a08e768f5ed.tar.bz2 plptools-1d9b2e0e156f9a58bd642b9f9e8b2a08e768f5ed.zip |
- rpcs: Implemented scratch RAM access.
- Updated spec file (not complete)
- Updated KDE translations
- kioslave and property-dialog now translate correctly
- ppsocket: Added a patch for FreeBSD
- plpftp: Some experimental code for testing
Diffstat (limited to 'plpftp')
-rw-r--r-- | plpftp/ftp.cc | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/plpftp/ftp.cc b/plpftp/ftp.cc index 9a2e655..fea9dcd 100644 --- a/plpftp/ftp.cc +++ b/plpftp/ftp.cc @@ -775,8 +775,47 @@ session(rfsv & a, rpcs & r, int xargc, char **xargv) } continue; } - if (!strcmp(argv[0], "y")) { - r.configRead(); + if (!strcmp(argv[0], "y") && (argc == 2)) { + u_int32_t size; + Enum<rfsv::errs> res; + bufferStore db; + bufferStore db2; + + sscanf(argv[1], "%lu", &size); +// while (1) { + res = r.configRead(size, db); + if (res != rfsv::E_PSI_GEN_NONE) { + cerr << "err: " << res << endl; + break; + } + if (db.getLen() != db2.getLen()) + cout << "New length: " << db.getLen() << endl; + if (db.getLen() == 1268) { + char *p = (char *)db.getString(0); +// p[0x164] = 2; + cout << "wr: " << r.configWrite(db) << endl; + } + res = r.configRead(size, db2); + if (res != rfsv::E_PSI_GEN_NONE) { + cerr << "err: " << res << endl; + break; + } +// else { + for (int i = 0; i < db.getLen(); i++) { + unsigned char c = db.getByte(i); + unsigned char c2 = db2.getByte(i); + if ((c != c2) && ((i < 0x350) || (i > 0x353))) + cout << hex << setw(4) << setfill('0') << i + << " " << setw(2) << setfill('0') << (int)c2 + << " " << setw(2) << setfill('0') << (int)c + << dec << endl; + } +#if 0 + } + db2 = db; + sleep(1); +#endif +// } continue; } #endif |