# HG changeset patch # User mroi # Date 1048940475 0 # Node ID 5ce26c18c455e61cc166c5afec8e3d99fc09fb2a # Parent 15e239caef8f08d62f3f59233938268aede87576 dvd_read_name can be static and does not need the whole vm_t* diff -r 15e239caef8f -r 5ce26c18c455 vm.c --- a/vm.c Fri Mar 28 11:56:40 2003 +0000 +++ b/vm.c Sat Mar 29 12:21:15 2003 +0000 @@ -121,7 +121,7 @@ } #endif -void dvd_read_name( vm_t *this, const char *devname) { +static void dvd_read_name(char *name, const char *device) { int fd, i; #ifndef __FreeBSD__ off64_t off; @@ -131,7 +131,7 @@ uint8_t data[DVD_VIDEO_LB_LEN]; /* Read DVD name */ - fd=open(devname, O_RDONLY); + fd=open(device, O_RDONLY); if (fd > 0) { off = lseek64( fd, 32 * (int64_t) DVD_VIDEO_LB_LEN, SEEK_SET ); if( off == ( 32 * (int64_t) DVD_VIDEO_LB_LEN ) ) { @@ -147,8 +147,8 @@ fprintf(MSG_OUT, " "); } } - strncpy(&this->dvd_name[0], &data[25], 48); - this->dvd_name[48]=0; + strncpy(name, &data[25], 48); + name[48] = 0; fprintf(MSG_OUT, "\nlibdvdnav: DVD Serial Number: "); for(i=73; i < 89; i++ ) { if((data[i] == 0)) break; @@ -315,7 +315,7 @@ fprintf(MSG_OUT, "libdvdnav: vm: faild to open/read the DVD\n"); return 0; } - dvd_read_name(vm, dvdroot); + dvd_read_name(vm->dvd_name, dvdroot); vm->map = remap_loadmap(vm->dvd_name); vm->vmgi = ifoOpenVMGI(vm->dvd); if(!vm->vmgi) { @@ -1808,6 +1808,9 @@ /* * $Log$ + * Revision 1.50 2003/03/29 12:21:15 mroi + * dvd_read_name can be static and does not need the whole vm_t* + * * Revision 1.49 2003/03/27 15:12:22 mroi * reorganize mutual header inclusion to fix warnings when compiling with TRACE defined * fix vm_jump_title_part to use correct title number (up to now the number was