Changeset 06331e4 in rtems


Ignore:
Timestamp:
Nov 27, 2018, 10:56:01 AM (5 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
89bff5a
Parents:
a7267241
git-author:
Sebastian Huber <sebastian.huber@…> (11/27/18 10:56:01)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/27/18 11:46:17)
Message:

dosfs: Fix device identifier

Update #3358.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/src/dosfs/fat.c

    ra7267241 r06331e4  
    506506    }
    507507
    508     vol->dev = stat_buf.st_dev;
     508    vol->dev = stat_buf.st_rdev;
    509509
    510510    /* Read boot record */
  • testsuites/fstests/fsdosfsname01/init.c

    ra7267241 r06331e4  
    3030#include <rtems/ramdisk.h>
    3131#include <rtems/libcsupport.h>
     32#include <rtems/userenv.h>
    3233#include "image.h"
    3334#include "image_bin_le_singlebyte.h"
     
    11491150}
    11501151
     1152static void test_getcwd( void )
     1153{
     1154  const char *dir_path = MOUNT_DIR "/somedir";
     1155  char cwd_buf[128];
     1156  char *cwd;
     1157  int rc;
     1158  rtems_status_code sc;
     1159
     1160  sc = rtems_libio_set_private_env();
     1161  rtems_test_assert( sc == RTEMS_SUCCESSFUL );
     1162
     1163  cwd = getcwd( cwd_buf, sizeof( cwd_buf ) );
     1164  rtems_test_assert( cwd != NULL );
     1165  rtems_test_assert( strcmp( cwd, "/" ) == 0 );
     1166
     1167  rc = mkdir( dir_path, S_IRWXU | S_IRWXG | S_IRWXO );
     1168  rtems_test_assert( rc == 0 );
     1169
     1170  rc = chdir( dir_path );
     1171  rtems_test_assert( rc == 0 );
     1172
     1173  cwd = getcwd( cwd_buf, sizeof( cwd_buf ) );
     1174  rtems_test_assert( cwd != NULL );
     1175  rtems_test_assert( strcmp( cwd, dir_path ) == 0 );
     1176
     1177  rc = chdir( "/" );
     1178  rtems_test_assert( rc == 0 );
     1179
     1180  rc = unlink( dir_path );
     1181  rtems_test_assert( rc == 0 );
     1182
     1183  cwd = getcwd( cwd_buf, sizeof( cwd_buf ) );
     1184  rtems_test_assert( cwd != NULL );
     1185  rtems_test_assert( strcmp( cwd, "/" ) == 0 );
     1186
     1187  rtems_libio_use_global_env();
     1188}
     1189
    11511190static void test_special_cases( void )
    11521191{
     
    11561195  test_file_with_same_name_as_volume_label();
    11571196  test_dir_with_same_name_as_volume_label();
     1197  test_getcwd();
    11581198}
    11591199
     
    14031443#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
    14041444#define CONFIGURE_MAXIMUM_SEMAPHORES (2 * RTEMS_DOSFS_SEMAPHORES_PER_INSTANCE)
     1445#define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS 2
    14051446#define CONFIGURE_APPLICATION_EXTRA_DRIVERS RAMDISK_DRIVER_TABLE_ENTRY
    14061447
Note: See TracChangeset for help on using the changeset viewer.