summaryrefslogtreecommitdiff
path: root/cmdline/apt-cache.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 17:02:38 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 17:02:38 +0000
commit7488f4586fd29c8ce9ac184b6d5205958b8381b2 (patch)
treeeb1add2ca396c21d5ee9d32366f8e87294950645 /cmdline/apt-cache.cc
parent3c0e4977e20b58d809b2bc19215e19db6292bb54 (diff)
* Write records from "apt-cache show" using fwrite(3) r...
Author: mdz Date: 2003-08-02 19:53:23 GMT * Write records from "apt-cache show" using fwrite(3) rather than write(2), in case for some reason the entire record doesn't get written by a single write(2)
Diffstat (limited to 'cmdline/apt-cache.cc')
-rw-r--r--cmdline/apt-cache.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index bcf4e1c0f..046d6f76c 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-cache.cc,v 1.66 2003/08/01 20:27:13 mdz Exp $
+// $Id: apt-cache.cc,v 1.67 2003/08/02 19:53:23 mdz Exp $
/* ######################################################################
apt-cache - Manages the cache files
@@ -1195,7 +1195,7 @@ bool DisplayRecord(pkgCache::VerIterator V)
Buffer[V.FileList()->Size] = '\n';
if (PkgF.Seek(V.FileList()->Offset) == false ||
PkgF.Read(Buffer,V.FileList()->Size) == false ||
- write(STDOUT_FILENO,Buffer,V.FileList()->Size+1) != V.FileList()->Size+1)
+ fwrite(Buffer,1,V.FileList()->Size+1,stdout) < V.FileList()->Size+1)
{
delete [] Buffer;
return false;