~ubuntu-branches/ubuntu/trusty/dosfstools/trusty

« back to all changes in this revision

Viewing changes to src/check.c

  • Committer: Package Import Robot
  • Author(s): Daniel Baumann
  • Date: 2014-03-07 18:52:50 UTC
  • mto: (4.3.14 experimental)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20140307185250-6hbp6ncxw1a4ospi
Tags: upstream-3.0.26
ImportĀ upstreamĀ versionĀ 3.0.26

Show diffs side-by-side

added added

removed removed

Lines of Context:
273
273
        strncmp((const char *)name, "WP ROOT  SF", 11) == 0)
274
274
        return 0;
275
275
 
 
276
        /* PATCH ED+DL */
 
277
        /* check if we have neither a long filename nor a short name */
 
278
        if ((file->lfn == NULL) && (file->dir_ent.lcase & FAT_NO_83NAME)) {
 
279
                return 1;
 
280
        }
 
281
 
276
282
    /* don't complain about the dummy 11 bytes used by patched Linux
277
283
       kernels */
278
284
    if (file->dir_ent.lcase & FAT_NO_83NAME)
395
401
                            (const char *)file->dir_ent.name, MSDOS_NAME))
396
402
                break;
397
403
        if (!walk) {
398
 
            fs_write(file->offset, MSDOS_NAME, file->dir_ent.name);
 
404
                /* PATCH ED+DL */
 
405
                if(file->dir_ent.lcase & FAT_NO_83NAME)
 
406
                {
 
407
                        /* as we only assign a new 8.3 filename, reset flag that 8.3 name is not
 
408
                           present */
 
409
                        file->dir_ent.lcase &= ~FAT_NO_83NAME;
 
410
                        /* reset the attributes */
 
411
                        file->dir_ent.attr &= ~(ATTR_DIR | ATTR_VOLUME); /* only keep the DIR and VOLUME attributes */
 
412
                        fs_write(file->offset, MSDOS_NAME+2, file->dir_ent.name);
 
413
                }
 
414
                else
 
415
                {
 
416
                        fs_write(file->offset, MSDOS_NAME, file->dir_ent.name);
 
417
                }
399
418
            if (file->lfn)
400
419
                lfn_fix_checksum(file->lfn_offset, file->offset,
401
420
                                 (const char *)file->dir_ent.name);
429
448
            walk[1] = 0;
430
449
            for (walk = name; *walk == ' ' || *walk == '\t'; walk++) ;
431
450
            if (file_cvt(walk, file->dir_ent.name)) {
432
 
                fs_write(file->offset, MSDOS_NAME, file->dir_ent.name);
 
451
                        /* PATCH ED+DL */
 
452
                        if(file->dir_ent.lcase & FAT_NO_83NAME)
 
453
                        {
 
454
                                /* as we only assign a new 8.3 filename, reset flag that 8.3 name is not
 
455
                                   present */
 
456
                                file->dir_ent.lcase &= ~FAT_NO_83NAME;
 
457
                                /* reset the attributes */
 
458
                                file->dir_ent.attr &= ~(ATTR_DIR | ATTR_VOLUME); /* only keep the DIR and VOLUME attributes */
 
459
                                fs_write(file->offset, MSDOS_NAME+2, file->dir_ent.name);
 
460
                        }
 
461
                        else
 
462
                        {
 
463
                                fs_write(file->offset, MSDOS_NAME, file->dir_ent.name);
 
464
                        }
433
465
                if (file->lfn)
434
466
                    lfn_fix_checksum(file->lfn_offset, file->offset,
435
467
                                     (const char *)file->dir_ent.name);