RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/lib/ rpmfi.c rpmfi.h

From: Jeff Johnson <jbj@rpm5.org>
Date: Sat 29 Sep 2007 - 00:36:16 CEST
Message-Id: <20070928223616.21186348469@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
  Module: rpm                              Date:   29-Sep-2007 00:36:16
  Branch: HEAD                             Handle: 2007092823361500

  Modified files:
    rpm                     CHANGES
    rpm/lib                 rpmfi.c rpmfi.h

  Log:
    - rpm.org: rename fileTypes_e and whatis() (for name spacing).
    - jbj: move (largely unused) fileTypes into rpmfi.h.

  Summary:
    Revision    Changes     Path
    1.1642      +2  -1      rpm/CHANGES
    2.78        +11 -11     rpm/lib/rpmfi.c
    2.40        +2  -2      rpm/lib/rpmfi.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1641 -r1.1642 CHANGES
  --- rpm/CHANGES	28 Sep 2007 22:26:49 -0000	1.1641
  +++ rpm/CHANGES	28 Sep 2007 22:36:15 -0000	1.1642
  @@ -1,5 +1,6 @@
   4.5 -> 5.0:
  -    - jbj: move (largely unused) fileTypes into rpmfi.h
  +    - rpm.org: rename fileTypes_e and whatis() (for name spacing).
  +    - jbj: move (largely unused) fileTypes into rpmfi.h.
       - jbj: remove whatis() from rpmlib, use S_ISFOO() instead.
       - jbj: ensure that PLD setup & FHS packages install correctly.
       - jbj: wrapper for open(2).
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfi.c
  ============================================================================
  $ cvs diff -u -r2.77 -r2.78 rpmfi.c
  --- rpm/lib/rpmfi.c	28 Sep 2007 22:26:49 -0000	2.77
  +++ rpm/lib/rpmfi.c	28 Sep 2007 22:36:15 -0000	2.78
  @@ -542,7 +542,7 @@
    * @return		string to identify a file type
    */
   static /*@observer@*/
  -const char * ftstring (fileTypes ft)
  +const char * rpmfiFtstring (rpmFileTypes ft)
   	/*@*/
   {
       switch (ft) {
  @@ -563,7 +563,7 @@
    * @param mode		file mode bits (from header)
    * @return		file type
    */
  -static fileTypes whatis(uint_16 mode)
  +static rpmFileTypes rpmfiWhatis(uint_16 mode)
   	/*@*/
   {
       if (S_ISDIR(mode))	return XDIR;
  @@ -581,8 +581,8 @@
   int rpmfiCompare(const rpmfi afi, const rpmfi bfi)
   	/*@*/
   {
  -    fileTypes awhat = whatis(rpmfiFMode(afi));
  -    fileTypes bwhat = whatis(rpmfiFMode(bfi));
  +    rpmFileTypes awhat = rpmfiWhatis(rpmfiFMode(afi));
  +    rpmFileTypes bwhat = rpmfiWhatis(rpmfiFMode(bfi));
   
       if (awhat != bwhat) return 1;
   
  @@ -619,7 +619,7 @@
       const char * fn = rpmfiFN(nfi);
       int newFlags = rpmfiFFlags(nfi);
       char buffer[1024+1];
  -    fileTypes dbWhat, newWhat, diskWhat;
  +    rpmFileTypes dbWhat, newWhat, diskWhat;
       struct stat sb;
       int save = (newFlags & RPMFILE_NOREPLACE) ? FA_ALTNAME : FA_SAVE;
   
  @@ -637,9 +637,9 @@
   	}
       }
   
  -    diskWhat = whatis((int_16)sb.st_mode);
  -    dbWhat = whatis(rpmfiFMode(ofi));
  -    newWhat = whatis(rpmfiFMode(nfi));
  +    diskWhat = rpmfiWhatis((int_16)sb.st_mode);
  +    dbWhat = rpmfiWhatis(rpmfiFMode(ofi));
  +    newWhat = rpmfiWhatis(rpmfiFMode(nfi));
   
       /*
        * RPM >= 2.3.10 shouldn't create config directories -- we'll ignore
  @@ -948,7 +948,7 @@
       /* Relocate individual paths. */
   
       for (i = fileCount - 1; i >= 0; i--) {
  -	fileTypes ft;
  +	rpmFileTypes ft;
   	int fnlen;
   
   	len = reldel +
  @@ -1002,7 +1002,7 @@
   	if (j < 0) continue;
   
   /*@-nullderef@*/ /* FIX: fModes may be NULL */
  -	ft = whatis(fModes[i]);
  +	ft = rpmfiWhatis(fModes[i]);
   /*@=nullderef@*/
   
   	/* On install, a relocate to NULL means skip the path. */
  @@ -1022,7 +1022,7 @@
   	    if (actions) {
   		actions[i] = FA_SKIPNSTATE;
   		rpmMessage(RPMMESS_DEBUG, D_("excluding %s %s\n"),
  -			ftstring(ft), fn);
  +			rpmfiFtstring(ft), fn);
   	    }
   	    continue;
   	}
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfi.h
  ============================================================================
  $ cvs diff -u -r2.39 -r2.40 rpmfi.h
  --- rpm/lib/rpmfi.h	28 Sep 2007 22:26:49 -0000	2.39
  +++ rpm/lib/rpmfi.h	28 Sep 2007 22:36:15 -0000	2.40
  @@ -18,7 +18,7 @@
    * the file mode tag from a header. The values are arbitrary,
    * but are identical to the linux stat(2) file types.
    */
  -typedef enum fileTypes_e {
  +typedef enum rpmFileTypes_e {
       PIPE	=  1,	/*!< pipe/fifo */
       CDEV	=  2,	/*!< character device */
       XDIR	=  4,	/*!< directory */
  @@ -26,7 +26,7 @@
       REG		=  8,	/*!< regular file */
       LINK	= 10,	/*!< hard link */
       SOCK	= 12	/*!< socket */
  -} fileTypes;
  +} rpmFileTypes;
   
   #if defined(_RPMFI_INTERNAL)
   /** \ingroup rpmfi
  @@ .
Received on Sat Sep 29 00:36:16 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.