]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rados.cc: use fwrite to output data to stdout
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Thu, 10 Feb 2011 16:24:25 +0000 (08:24 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Thu, 10 Feb 2011 17:16:22 +0000 (09:16 -0800)
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
src/rados.cc

index dca04103bf538ae9f457f8f404efa271a63b81c9..f6a6e6d1192ab8f767fb7c578d03f100ad100032 100644 (file)
@@ -334,10 +334,7 @@ int main(int argc, const char **argv)
     }
 
     if (strcmp(nargs[2], "-") == 0) {
-      if (::write(1, outdata.c_str(), outdata.length()) < 0) {
-       int err = errno;
-       cerr << "error writing to stdout: error " << err << std::endl;
-      }
+      fwrite(outdata.c_str(), outdata.length(), 1, stdout);
     } else {
       outdata.write_file(nargs[2]);
       generic_dout(0) << "wrote " << outdata.length() << " byte payload to " << nargs[2] << dendl;