| PLEX86 | ||
|
No such file or directory" in Batch mode 7353can't read superblock on a xfs parbreastion This is strange. If xfsgrowfs does not check the type of the specified file, it will try to operate on the file given, in this case a directory. It must open the given file read... -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Have you tried the same under sh-bash or any POSIX shell? AFAIK this is a fairly ancient release. Have you considered upgrading? You didn't mention which compiler version you were using, but if it's what came with RH9, it won't be recent. No such file or directory" in Batch mode 7354 Hi Roger, Roger Leigh That would be something for my employer to decide. I will try to mention... If you're doing software development, why use ancient and obsolete tools when you could be using something decent, like GCC 4.0? This is especially important if you're writing in C++.
Although it's not related to the problem at hand, just a few criticisms: 1) Why does the function return a long? I can't believe you have that many error codes! Why don't you - return an int - also, use enums rather than #defines, and return an enum rather than some meaningless number. The compiler will then be able to do static type checking of the return value. - throw an exception derived from std::runtimeerror. This could also include an error code. 2) You are using Hungarian notation: fpInputFile? Urgh! Why not just "fp" or "input"? It's type is obvious: a FILE*, so drop it from the name, and use a name which is related to its use. 2) Why are you using cstdio and perror? C++ has iostreams, so why not make use of them? std::cerr and std::clog exist just for this purpose. If you really want format strings, try boost::format, which gives you type safety, and works with std::ostream and std::string rather well. 3) If you used iostreams, you can detect error using the builtin methods, and if you must use a file descriptor or FILE * type, gnucxx::stdiofilebuf exists to wrap it in GNU libstdc++. 4) This isn't C++, it's C, and messy C at that. regarding unix specific commands 7355 fidlee Well, the program is kind of boring, and I would not use that indenting style. If you change the printf to: printf("Process id is %un",pid); ^ it will be a... This is the equivalent C++: std::ifstream input(filename); if (input) { do stuff } else { throw error(); } Who knows? You didn't show us the script, so it's impossible to say. future reference. Print out each item in argv so that you can compare the difference between the two. It's probably a quoting issue. Try something like this: regarding unix specific commands 7356 Let me inject something here that needs to be said *before* you get too far out... int main (int argc, char *argv) { for (const char * const *iter = argv; *iter != 0; ++iter) { if (*(iter + 1) != 0) } return 0; } With GNU Bash: $ .-test hello world "test quoting" moretesting 1 2 3 ".-test", "hello", "world", "test quoting", "more testing", "1", "2", "3" Regards, Roger - -- Roger Leigh GPG Public Key: 0x25BFB848. Please sign and encrypt your mail. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU-Linux) iD8DBQFDtCOuVcFcaSW-uEgRAp+0AKDZr20cdlJ4kOZ6SiCZLDZcGM9PeACfSG0e 2quj8Bvz4K2mgDEBzX25Kmg= =FzZn -----END PGP SIGNATURE-----
|
||||
No such file or directory" in Batch mode 7354 Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||