blob: 1b5b9678e07409c165e82a02af16ed6023451b4e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
Index: bootadm/usr/src/cmd/boot/fiocompress/fiocompress.c
===================================================================
--- bootadm.orig/usr/src/cmd/boot/fiocompress/fiocompress.c 2012-10-08 04:25:23.000000000 +0400
+++ bootadm/usr/src/cmd/boot/fiocompress/fiocompress.c 2012-12-29 15:47:09.786339992 +0400
@@ -30,6 +30,7 @@
*/
#include <stdio.h>
+#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <fcntl.h>
@@ -37,11 +38,29 @@
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
-#include <utility.h>
#include <zlib.h>
#include <sys/filio.h>
-#include <sys/fs/decomp.h>
+
+/* From sys/fs/decomp.h >>>>> */
+struct comphdr {
+ uint64_t ch_magic;
+ uint64_t ch_version;
+ uint64_t ch_algorithm;
+ uint64_t ch_fsize;
+ uint64_t ch_blksize;
+ uint64_t ch_blkmap[1];
+};
+
+#define CH_MAGIC_ZLIB 0x5a636d70 /* ZLIB compression */
+#define CH_MAGIC_GZIP 0x8B1F /* GZIP compression */
+#define CH_VERSION 1
+#define CH_ALG_ZLIB 1
+
+#define ZMAXBUF(n) ((n) + ((n) / 1000) + 12)
+/* <<<<< From sys/fs/decomp.h */
+
+#define MIN(x, y) ((x) < (y) ? (x) : (y))
#include "message.h"
|