Forum Discussion
Altera_Forum
Honored Contributor
21 years agoTo fix this bug, the application source ls.c has to be modified. It can be found in application source directory fileutils. The problematic codes start from line 307:
if (S_ISBLK(statbuf->st_mode) || S_ISCHR(statbuf->st_mode))
sprintf(cp, "%3d, %3d ", statbuf->st_rdev >> 8,
statbuf->st_rdev & 0xff); To fix this bug, please change them to if (S_ISBLK(statbuf->st_mode) || S_ISCHR(statbuf->st_mode))
sprintf(cp, "%3d, %3d ", (unsigned int)(statbuf->st_rdev >> 8),
(unsigned int)(statbuf->st_rdev & 0xff));