Avoid entirely silly rpmio use in addFileToTagAux()
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 24 Mar 2008 17:00:48 +0000 (19:00 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 24 Mar 2008 17:00:48 +0000 (19:00 +0200)
build/pack.c

index 78c83e7..5488b5c 100644 (file)
@@ -115,17 +115,15 @@ static StringBuf addFileToTagAux(rpmSpec spec,
     char buf[BUFSIZ];
     char * fn = buf;
     FILE * f;
-    FD_t fd;
 
     fn = rpmGetPath("%{_builddir}/%{?buildsubdir:%{buildsubdir}/}", file, NULL);
 
-    fd = Fopen(fn, "r.ufdio");
+    f = fopen(fn, "r");
     if (fn != buf) fn = _free(fn);
-    if (fd == NULL || Ferror(fd)) {
+    if (f == NULL || ferror(f)) {
        sb = freeStringBuf(sb);
        return NULL;
     }
-    if ((f = fdGetFILE(fd)) != NULL)
     while (fgets(buf, sizeof(buf), f)) {
        /* XXX display fn in error msg */
        if (expandMacros(spec, spec->macros, buf, sizeof(buf))) {
@@ -135,7 +133,7 @@ static StringBuf addFileToTagAux(rpmSpec spec,
        }
        appendStringBuf(sb, buf);
     }
-    (void) Fclose(fd);
+    (void) fclose(f);
 
     return sb;
 }