Contents of /trunk/rpm2targz/patches/rpm2targz-9.0-bzip2.patch
Parent Directory | Revision Log
Revision 153 -
(show annotations)
(download)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 800 byte(s)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 800 byte(s)
-import
1 | --- rpmoffset.c 2003-06-21 13:25:14.000000000 +0100 |
2 | +++ rpmoffset.c.new 2003-06-26 00:27:31.000000000 +0100 |
3 | @@ -1,4 +1,3 @@ |
4 | - |
5 | /* Find how deeply inside an .RPM the real data is */ |
6 | /* kept, and report the offset in bytes */ |
7 | |
8 | @@ -16,8 +15,17 @@ |
9 | { |
10 | char *buff = malloc(RPMBUFSIZ),*eb,*p; |
11 | for (p = buff, eb = buff + read(0,buff,RPMBUFSIZ); p < eb; p++) |
12 | - if (*p == '\037' && p[1] == '\213' && p[2] == '\010') |
13 | - printf("%d\n",p - buff), |
14 | + { |
15 | + if (*p == '\037' && p[1] == '\213' && p[2] == '\010') |
16 | + { |
17 | + printf("%d\n",p - buff); |
18 | exit(0); |
19 | + } |
20 | + else if (*p == 'B' && p[1] == 'Z' && p[2] == 'h' ) |
21 | + { |
22 | + printf("%d\n",p - buff); |
23 | + exit(0); |
24 | + } |
25 | + } |
26 | exit(1); |
27 | } |