|
From: | Wang Chen |
Subject: | [aspell-devel] Linux device number bug report(aspell) |
Date: | Tue, 13 Jan 2004 11:35:20 +0800 |
Hello, I have some questions about device number. Package:aspell-0.50.4.1 File:modules/speller/default/data_id.hpp:17 Code:12 class DataSet::Id { 13 public: // but don't use 14 const DataSet * ptr; 15 const char * file_name; 16 #ifdef USE_FILE_INO 17 dev_t ino; 18 ino_t dev; 19 #endif 20 public: 21 Id(DataSet * p, const FileName & fn = FileName()); 22 }; In this class definition, member "ino", which represents File Serial Number, is declared as dev_t type. But "dev", which represents Device Number, is declared as ino_t type. File:modules/speller/default/data.cpp:30 Code:27 struct stat s; 28 // the file ,i 29 if (file_name[0] != '\0' && stat(fn.path.c_str(), &s) == 0) { 30 ino = s.st_ino; 31 dev = s.st_dev; 32 } else { 33 ino = 0; 34 dev = 0; 35 } The code indicates that "ino" should be ino_t type and "dev" should be dev_t type. So I think the following code in file data_id.hpp will be better. dev_t dev; ino_t ino; Looking forward to answering. -------------------------------------------------- Wang Chen Dept. of Technology and Development Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 16-5, Guanzhou Rd., Nanjing, P.R.China PHONE : +86+25-86630523-636 FUJITSU INTERNAL: 79955-636 FAX : +86+25-83317685 Mail : address@hidden -------------------------------------------------- |
[Prev in Thread] | Current Thread | [Next in Thread] |