| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: iso9660_rrip.c,v 1.14 2014/05/30 13:14:47 martin Exp $ */ | | 1 | /* $NetBSD: iso9660_rrip.c,v 1.15 2023/04/18 22:56:41 christos Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan | | 4 | * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan |
5 | * Perez-Rathke and Ram Vedam. All rights reserved. | | 5 | * Perez-Rathke and Ram Vedam. All rights reserved. |
6 | * | | 6 | * |
7 | * This code was written by Daniel Watt, Walter Deignan, Ryan Gabrys, | | 7 | * This code was written by Daniel Watt, Walter Deignan, Ryan Gabrys, |
8 | * Alan Perez-Rathke and Ram Vedam. | | 8 | * Alan Perez-Rathke and Ram Vedam. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or | | 10 | * Redistribution and use in source and binary forms, with or |
11 | * without modification, are permitted provided that the following | | 11 | * without modification, are permitted provided that the following |
12 | * conditions are met: | | 12 | * conditions are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -34,27 +34,27 @@ | | | @@ -34,27 +34,27 @@ |
34 | /* This will hold all the function definitions | | 34 | /* This will hold all the function definitions |
35 | * defined in iso9660_rrip.h | | 35 | * defined in iso9660_rrip.h |
36 | */ | | 36 | */ |
37 | | | 37 | |
38 | #include "makefs.h" | | 38 | #include "makefs.h" |
39 | #include "cd9660.h" | | 39 | #include "cd9660.h" |
40 | #include "iso9660_rrip.h" | | 40 | #include "iso9660_rrip.h" |
41 | #include <sys/queue.h> | | 41 | #include <sys/queue.h> |
42 | #include <stdio.h> | | 42 | #include <stdio.h> |
43 | #include <util.h> | | 43 | #include <util.h> |
44 | | | 44 | |
45 | #include <sys/cdefs.h> | | 45 | #include <sys/cdefs.h> |
46 | #if defined(__RCSID) && !defined(__lint) | | 46 | #if defined(__RCSID) && !defined(__lint) |
47 | __RCSID("$NetBSD: iso9660_rrip.c,v 1.14 2014/05/30 13:14:47 martin Exp $"); | | 47 | __RCSID("$NetBSD: iso9660_rrip.c,v 1.15 2023/04/18 22:56:41 christos Exp $"); |
48 | #endif /* !__lint */ | | 48 | #endif /* !__lint */ |
49 | | | 49 | |
50 | static void cd9660_rrip_initialize_inode(cd9660node *); | | 50 | static void cd9660_rrip_initialize_inode(cd9660node *); |
51 | static int cd9660_susp_handle_continuation(iso9660_disk *, cd9660node *); | | 51 | static int cd9660_susp_handle_continuation(iso9660_disk *, cd9660node *); |
52 | static int cd9660_susp_handle_continuation_common(iso9660_disk *, cd9660node *, | | 52 | static int cd9660_susp_handle_continuation_common(iso9660_disk *, cd9660node *, |
53 | int); | | 53 | int); |
54 | | | 54 | |
55 | int | | 55 | int |
56 | cd9660_susp_initialize(iso9660_disk *diskStructure, cd9660node *node, | | 56 | cd9660_susp_initialize(iso9660_disk *diskStructure, cd9660node *node, |
57 | cd9660node *parent, cd9660node *grandparent) | | 57 | cd9660node *parent, cd9660node *grandparent) |
58 | { | | 58 | { |
59 | cd9660node *cn; | | 59 | cd9660node *cn; |
60 | int r; | | 60 | int r; |
| @@ -687,31 +687,31 @@ cd9660node_rrip_nm(struct ISO_SUSP_ATTRI | | | @@ -687,31 +687,31 @@ cd9660node_rrip_nm(struct ISO_SUSP_ATTRI |
687 | int | | 687 | int |
688 | cd9660node_rrip_tf(struct ISO_SUSP_ATTRIBUTES *p, fsnode *_node) | | 688 | cd9660node_rrip_tf(struct ISO_SUSP_ATTRIBUTES *p, fsnode *_node) |
689 | { | | 689 | { |
690 | p->attr.rr_entry.TF.flags[0] = TF_MODIFY | TF_ACCESS | TF_ATTRIBUTES; | | 690 | p->attr.rr_entry.TF.flags[0] = TF_MODIFY | TF_ACCESS | TF_ATTRIBUTES; |
691 | p->attr.rr_entry.TF.h.length[0] = 5; | | 691 | p->attr.rr_entry.TF.h.length[0] = 5; |
692 | p->attr.rr_entry.TF.h.version[0] = 1; | | 692 | p->attr.rr_entry.TF.h.version[0] = 1; |
693 | | | 693 | |
694 | /* | | 694 | /* |
695 | * Need to add creation time, backup time, | | 695 | * Need to add creation time, backup time, |
696 | * expiration time, and effective time. | | 696 | * expiration time, and effective time. |
697 | */ | | 697 | */ |
698 | | | 698 | |
699 | cd9660_time_915(p->attr.rr_entry.TF.timestamp, | | 699 | cd9660_time_915(p->attr.rr_entry.TF.timestamp, |
700 | _node->inode->st.st_atime); | | 700 | _node->inode->st.st_mtime); |
701 | p->attr.rr_entry.TF.h.length[0] += 7; | | 701 | p->attr.rr_entry.TF.h.length[0] += 7; |
702 | | | 702 | |
703 | cd9660_time_915(p->attr.rr_entry.TF.timestamp + 7, | | 703 | cd9660_time_915(p->attr.rr_entry.TF.timestamp + 7, |
704 | _node->inode->st.st_mtime); | | 704 | _node->inode->st.st_atime); |
705 | p->attr.rr_entry.TF.h.length[0] += 7; | | 705 | p->attr.rr_entry.TF.h.length[0] += 7; |
706 | | | 706 | |
707 | cd9660_time_915(p->attr.rr_entry.TF.timestamp + 14, | | 707 | cd9660_time_915(p->attr.rr_entry.TF.timestamp + 14, |
708 | _node->inode->st.st_ctime); | | 708 | _node->inode->st.st_ctime); |
709 | p->attr.rr_entry.TF.h.length[0] += 7; | | 709 | p->attr.rr_entry.TF.h.length[0] += 7; |
710 | return 1; | | 710 | return 1; |
711 | } | | 711 | } |
712 | | | 712 | |
713 | int | | 713 | int |
714 | cd9660_susp_sp(struct ISO_SUSP_ATTRIBUTES *p, cd9660node *spinfo __unused) | | 714 | cd9660_susp_sp(struct ISO_SUSP_ATTRIBUTES *p, cd9660node *spinfo __unused) |
715 | { | | 715 | { |
716 | p->attr.su_entry.SP.h.length[0] = 7; | | 716 | p->attr.su_entry.SP.h.length[0] = 7; |
717 | p->attr.su_entry.SP.h.version[0] = 1; | | 717 | p->attr.su_entry.SP.h.version[0] = 1; |