Deleted Added
full compact
cd9660_write.c (214921) cd9660_write.c (223306)
1/* $NetBSD: cd9660_write.c,v 1.13 2010/10/22 00:49:15 christos Exp $ */
2
3/*
4 * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
5 * Perez-Rathke and Ram Vedam. All rights reserved.
6 *
7 * This code was written by Daniel Watt, Walter Deignan, Ryan Gabrys,
8 * Alan Perez-Rathke and Ram Vedam.

--- 22 unchanged lines hidden (view full) ---

31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
32 * OF SUCH DAMAGE.
33 */
34
35#include "cd9660.h"
36#include "iso9660_rrip.h"
37
38#include <sys/cdefs.h>
1/* $NetBSD: cd9660_write.c,v 1.13 2010/10/22 00:49:15 christos Exp $ */
2
3/*
4 * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
5 * Perez-Rathke and Ram Vedam. All rights reserved.
6 *
7 * This code was written by Daniel Watt, Walter Deignan, Ryan Gabrys,
8 * Alan Perez-Rathke and Ram Vedam.

--- 22 unchanged lines hidden (view full) ---

31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
32 * OF SUCH DAMAGE.
33 */
34
35#include "cd9660.h"
36#include "iso9660_rrip.h"
37
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/usr.sbin/makefs/cd9660/cd9660_write.c 214921 2010-11-07 16:05:04Z cognet $");
39__FBSDID("$FreeBSD: head/usr.sbin/makefs/cd9660/cd9660_write.c 223306 2011-06-19 18:34:49Z marcel $");
40
41static int cd9660_write_volume_descriptors(FILE *);
42static int cd9660_write_path_table(FILE *, off_t, int);
43static int cd9660_write_path_tables(FILE *);
44static int cd9660_write_file(FILE *, cd9660node *);
45static int cd9660_write_filedata(FILE *, off_t, const unsigned char *, int);
46#if 0
47static int cd9660_write_buffered(FILE *, off_t, int, const unsigned char *);

--- 241 unchanged lines hidden (view full) ---

289 /* Only attempt to write unwritten files that have length. */
290 if ((inode->flags & FI_WRITTEN) != 0) {
291 INODE_WARNX(("%s: skipping written inode %d", __func__,
292 (int)inode->st.st_ino));
293 } else if (writenode->fileDataLength > 0) {
294 INODE_WARNX(("%s: writing inode %d blocks at %" PRIu32,
295 __func__, (int)inode->st.st_ino, inode->ino));
296 inode->flags |= FI_WRITTEN;
40
41static int cd9660_write_volume_descriptors(FILE *);
42static int cd9660_write_path_table(FILE *, off_t, int);
43static int cd9660_write_path_tables(FILE *);
44static int cd9660_write_file(FILE *, cd9660node *);
45static int cd9660_write_filedata(FILE *, off_t, const unsigned char *, int);
46#if 0
47static int cd9660_write_buffered(FILE *, off_t, int, const unsigned char *);

--- 241 unchanged lines hidden (view full) ---

289 /* Only attempt to write unwritten files that have length. */
290 if ((inode->flags & FI_WRITTEN) != 0) {
291 INODE_WARNX(("%s: skipping written inode %d", __func__,
292 (int)inode->st.st_ino));
293 } else if (writenode->fileDataLength > 0) {
294 INODE_WARNX(("%s: writing inode %d blocks at %" PRIu32,
295 __func__, (int)inode->st.st_ino, inode->ino));
296 inode->flags |= FI_WRITTEN;
297 cd9660_compute_full_filename(writenode,
298 temp_file_name, 0);
297 if (writenode->node->contents == NULL)
298 cd9660_compute_full_filename(writenode,
299 temp_file_name, 0);
299 ret = cd9660_copy_file(fd, writenode->fileDataSector,
300 ret = cd9660_copy_file(fd, writenode->fileDataSector,
300 temp_file_name);
301 (writenode->node->contents != NULL) ?
302 writenode->node->contents : temp_file_name);
301 if (ret == 0)
302 goto out;
303 }
304 } else {
305 /*
306 * Here is a new revelation that ECMA didnt explain
307 * (at least not well).
308 * ALL . and .. records store the name "\0" and "\1"

--- 210 unchanged lines hidden ---
303 if (ret == 0)
304 goto out;
305 }
306 } else {
307 /*
308 * Here is a new revelation that ECMA didnt explain
309 * (at least not well).
310 * ALL . and .. records store the name "\0" and "\1"

--- 210 unchanged lines hidden ---