From: | "Mike Frysinger (vapier)" <vapier@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-projects commit in portage-utils/libq: vdb.c |
Date: | Wed, 21 Dec 2011 04:20:10 |
Message-Id: | 20111221042000.7BCD32004B@flycatcher.gentoo.org |
1 | vapier 11/12/21 04:20:00 |
2 | |
3 | Modified: vdb.c |
4 | Log: |
5 | filter out files/etc... from cat/pkg listing |
6 | |
7 | Revision Changes Path |
8 | 1.4 portage-utils/libq/vdb.c |
9 | |
10 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/libq/vdb.c?rev=1.4&view=markup |
11 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/libq/vdb.c?rev=1.4&content-type=text/plain |
12 | diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/libq/vdb.c?r1=1.3&r2=1.4 |
13 | |
14 | Index: vdb.c |
15 | =================================================================== |
16 | RCS file: /var/cvsroot/gentoo-projects/portage-utils/libq/vdb.c,v |
17 | retrieving revision 1.3 |
18 | retrieving revision 1.4 |
19 | diff -u -r1.3 -r1.4 |
20 | --- vdb.c 18 Dec 2011 20:21:15 -0000 1.3 |
21 | +++ vdb.c 21 Dec 2011 04:20:00 -0000 1.4 |
22 | @@ -1,7 +1,7 @@ |
23 | /* |
24 | * Copyright 2005-2011 Gentoo Foundation |
25 | * Distributed under the terms of the GNU General Public License v2 |
26 | - * $Header: /var/cvsroot/gentoo-projects/portage-utils/libq/vdb.c,v 1.3 2011/12/18 20:21:15 vapier Exp $ |
27 | + * $Header: /var/cvsroot/gentoo-projects/portage-utils/libq/vdb.c,v 1.4 2011/12/21 04:20:00 vapier Exp $ |
28 | * |
29 | * Copyright 2005-2010 Ned Ludd - <solar@g.o> |
30 | * Copyright 2005-2011 Mike Frysinger - <vapier@g.o> |
31 | @@ -81,6 +81,13 @@ |
32 | { |
33 | int i; |
34 | |
35 | +#ifdef DT_UNKNOWN |
36 | + if (de->d_type != DT_UNKNOWN && |
37 | + de->d_type != DT_DIR && |
38 | + de->d_type != DT_LNK) |
39 | + return 0; |
40 | +#endif |
41 | + |
42 | if (de->d_name[0] == '.' || de->d_name[0] == '-') |
43 | return 0; |
44 | |
45 | @@ -168,6 +175,13 @@ |
46 | |
47 | _q_static int q_vdb_filter_pkg(const struct dirent *de) |
48 | { |
49 | +#ifdef DT_UNKNOWN |
50 | + if (de->d_type != DT_UNKNOWN && |
51 | + de->d_type != DT_DIR && |
52 | + de->d_type != DT_LNK) |
53 | + return 0; |
54 | +#endif |
55 | + |
56 | if (de->d_name[0] == '.' || de->d_name[0] == '-') |
57 | return 0; |