diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-14 23:29:43 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-14 23:29:43 +0000 |
commit | 94b2a0793f55c1d107c261c5bea8e42dd7e2da2a (patch) | |
tree | c7697402fb9c79ab909582f81bcc453059890d8a | |
parent | a65a799bc8ade1c5311357edc3ef0f90e8eb11cb (diff) | |
download | nuttx-94b2a0793f55c1d107c261c5bea8e42dd7e2da2a.tar.gz nuttx-94b2a0793f55c1d107c261c5bea8e42dd7e2da2a.tar.bz2 nuttx-94b2a0793f55c1d107c261c5bea8e42dd7e2da2a.zip |
Fix NXTEXT link error
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3787 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r-- | apps/examples/nxtext/nxtext_internal.h | 4 | ||||
-rw-r--r-- | nuttx/fs/fat/fs_fat32dirent.c | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/apps/examples/nxtext/nxtext_internal.h b/apps/examples/nxtext/nxtext_internal.h index b9c2b8d64..16f8bb08a 100644 --- a/apps/examples/nxtext/nxtext_internal.h +++ b/apps/examples/nxtext/nxtext_internal.h @@ -268,8 +268,8 @@ extern const struct nx_callback_s g_bgcb; /* The screen resolution */ -nxgl_coord_t g_xres; -nxgl_coord_t g_yres; +extern nxgl_coord_t g_xres; +extern nxgl_coord_t g_yres; extern bool b_haveresolution; #ifdef CONFIG_NX_MULTIUSER diff --git a/nuttx/fs/fat/fs_fat32dirent.c b/nuttx/fs/fat/fs_fat32dirent.c index d386adc46..e5bc99ccb 100644 --- a/nuttx/fs/fat/fs_fat32dirent.c +++ b/nuttx/fs/fat/fs_fat32dirent.c @@ -986,7 +986,7 @@ static inline int fat_findlfnentry(struct fat_mountpt_s *fs, * order.. from last to first). */ - lastseq = LDIR_SEQ | nentries; + lastseq = LDIR0_LAST | nentries; seqno = lastseq; /* Search, beginning with the current sector, for a directory entry this @@ -1274,7 +1274,7 @@ static inline int fat_allocatelfnentry(struct fat_mountpt_s *fs, /* Check if this directory entry is empty */ - ch = direntry[DIR_NAME]; + ch = LDIR_GETSEQ(direntry); if (ch == DIR0_ALLEMPTY || ch == DIR0_EMPTY) { /* It is empty -- we have found a directory entry. Is this the @@ -1288,7 +1288,7 @@ static inline int fat_allocatelfnentry(struct fat_mountpt_s *fs, dirinfo->fd_seq.ds_lfnsector = fs->fs_currentsector; dirinfo->fd_seq.ds_lfnoffset = diroffset; dirinfo->fd_seq.ds_lfncluster = dirinfo->dir.fd_currcluster; - } + } /* Is this last entry we need (i.e., the entry for the short * file name entry)? @@ -1790,6 +1790,7 @@ static int fat_putlfname(struct fat_mountpt_s *fs, struct fat_dirinfo_s *dirinfo dirinfo->dir.fd_currcluster = dirinfo->fd_seq.ds_lfncluster; dirinfo->dir.fd_currsector = dirinfo->fd_seq.ds_lfnsector; + dirinfo->dir.fd_index = dirinfo->fd_seq.ds_lfnoffset / DIR_SIZE; /* Make sure that the sector containing the "last" long file name entry * is in the sector cache (it probably is not). @@ -1807,7 +1808,7 @@ static int fat_putlfname(struct fat_mountpt_s *fs, struct fat_dirinfo_s *dirinfo { /* Get the string offset associated with the directory entry. */ - offset = nentries * LDIR_MAXLFNCHARS; + offset = (nentries - 1) * LDIR_MAXLFNCHARS; /* Get a reference to the current directory entry */ |