Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 309022 Details for
Bug 450838
Missing casts in gfs2_edit and gfs2_fsck
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch
450838.patch (text/plain), 5.48 KB, created by
Robert Peterson
on 2008-06-12 03:33:58 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Robert Peterson
Created:
2008-06-12 03:33:58 UTC
Size:
5.48 KB
patch
obsolete
> gfs2/edit/hexedit.c | 4 ++-- > gfs2/fsck/lost_n_found.c | 26 +++++++++++++++++--------- > gfs2/quota/main.c | 16 ++++++++++++---- > gfs2/tool/df.c | 9 ++++++--- > 4 files changed, 37 insertions(+), 18 deletions(-) > >diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c >index 99af162..fd59527 100644 >--- a/gfs2/edit/hexedit.c >+++ b/gfs2/edit/hexedit.c >@@ -631,7 +631,7 @@ void rgcount(void) > ribh = bread(&sbd, block); > riinode = inode_get(&sbd, ribh); > printf("%lld RGs in this file system.\n", >- riinode->i_di.di_size / risize()); >+ (unsigned long long)riinode->i_di.di_size / risize()); > inode_put(riinode, not_updated); > exit(EXIT_SUCCESS); > } >@@ -730,7 +730,7 @@ uint64_t get_rg_addr(int rgnum) > rgblk = find_rgrp_block(riinode, rgnum); > else > fprintf(stderr, "Error: File system only has %lld RGs.\n", >- riinode->i_di.di_size / risize()); >+ (unsigned long long)riinode->i_di.di_size / risize()); > inode_put(riinode, not_updated); > return rgblk; > } >diff --git a/gfs2/fsck/lost_n_found.c b/gfs2/fsck/lost_n_found.c >index 7b4edae..5b21aae 100644 >--- a/gfs2/fsck/lost_n_found.c >+++ b/gfs2/fsck/lost_n_found.c >@@ -80,35 +80,43 @@ int add_inode_to_lf(struct gfs2_inode *ip){ > > dir_add(ip, filename, filename_len, &(lf_dip->i_di.di_num), DT_DIR); > free(filename); >- sprintf(tmp_name, "lost_dir_%llu", ip->i_di.di_num.no_addr); >+ sprintf(tmp_name, "lost_dir_%llu", >+ (unsigned long long)ip->i_di.di_num.no_addr); > inode_type = DT_DIR; > break; > case S_IFREG: >- sprintf(tmp_name, "lost_file_%llu", ip->i_di.di_num.no_addr); >+ sprintf(tmp_name, "lost_file_%llu", >+ (unsigned long long)ip->i_di.di_num.no_addr); > inode_type = DT_REG; > break; > case S_IFLNK: >- sprintf(tmp_name, "lost_link_%llu", ip->i_di.di_num.no_addr); >+ sprintf(tmp_name, "lost_link_%llu", >+ (unsigned long long)ip->i_di.di_num.no_addr); > inode_type = DT_LNK; > break; > case S_IFBLK: >- sprintf(tmp_name, "lost_blkdev_%llu", ip->i_di.di_num.no_addr); >+ sprintf(tmp_name, "lost_blkdev_%llu", >+ (unsigned long long)ip->i_di.di_num.no_addr); > inode_type = DT_BLK; > break; > case S_IFCHR: >- sprintf(tmp_name, "lost_chrdev_%llu", ip->i_di.di_num.no_addr); >+ sprintf(tmp_name, "lost_chrdev_%llu", >+ (unsigned long long)ip->i_di.di_num.no_addr); > inode_type = DT_CHR; > break; > case S_IFIFO: >- sprintf(tmp_name, "lost_fifo_%llu", ip->i_di.di_num.no_addr); >+ sprintf(tmp_name, "lost_fifo_%llu", >+ (unsigned long long)ip->i_di.di_num.no_addr); > inode_type = DT_FIFO; > break; > case S_IFSOCK: >- sprintf(tmp_name, "lost_socket_%llu", ip->i_di.di_num.no_addr); >+ sprintf(tmp_name, "lost_socket_%llu", >+ (unsigned long long)ip->i_di.di_num.no_addr); > inode_type = DT_SOCK; > break; > default: >- sprintf(tmp_name, "lost_%llu", ip->i_di.di_num.no_addr); >+ sprintf(tmp_name, "lost_%llu", >+ (unsigned long long)ip->i_di.di_num.no_addr); > inode_type = DT_REG; > break; > } >@@ -132,6 +140,6 @@ int add_inode_to_lf(struct gfs2_inode *ip){ > > free(filename); > log_notice("Added inode #%"PRIu64" to lost+found dir\n", >- ip->i_di.di_num.no_addr); >+ ip->i_di.di_num.no_addr); > return 0; > } >diff --git a/gfs2/quota/main.c b/gfs2/quota/main.c >index 747049b..79aae05 100644 >--- a/gfs2/quota/main.c >+++ b/gfs2/quota/main.c >@@ -244,25 +244,33 @@ print_quota(commandline_t *comline, > case GQ_UNITS_KILOBYTE: > if (sb->sb_bsize == 512) > printf("limit: %-10llu warn: %-10lluvalue: %-10llu\n", >- q->qu_limit / 2, >- q->qu_warn / 2, >- q->qu_value / 2); >+ (unsigned long long)q->qu_limit / 2, >+ (unsigned long long)q->qu_warn / 2, >+ (unsigned long long)q->qu_value / 2); > else > printf("limit: %-10llu warn: %-10lluvalue: %-10llu\n", >+ (unsigned long long) > q->qu_limit << (sb->sb_bsize_shift - 10), >+ (unsigned long long) > q->qu_warn << (sb->sb_bsize_shift - 10), >+ (unsigned long long) > q->qu_value << (sb->sb_bsize_shift - 10)); > break; > > case GQ_UNITS_FSBLOCK: > printf("limit: %-10llu warn: %-10llu value: %-10llu\n", >- q->qu_limit, q->qu_warn, q->qu_value); >+ (unsigned long long)q->qu_limit, >+ (unsigned long long)q->qu_warn, >+ (unsigned long long)q->qu_value); > break; > > case GQ_UNITS_BASICBLOCK: > printf("limit: %-10llu warn: %-10llu value: %-10llu\n", >+ (unsigned long long) > q->qu_limit << (sb->sb_bsize_shift - 9), >+ (unsigned long long) > q->qu_warn << (sb->sb_bsize_shift - 9), >+ (unsigned long long) > q->qu_value << (sb->sb_bsize_shift - 9)); > break; > >diff --git a/gfs2/tool/df.c b/gfs2/tool/df.c >index 386a217..5237072 100644 >--- a/gfs2/tool/df.c >+++ b/gfs2/tool/df.c >@@ -121,14 +121,17 @@ do_df_one(char *path) > percentage = sc.sc_total ? > (100.0 * (sc.sc_total - sc.sc_free)) / sc.sc_total + 0.5 : 0; > printf(" %-15s%-15llu%-15llu%-15llu%u%%\n", "data", >- sc.sc_total, sc.sc_total - sc.sc_free, sc.sc_free, percentage); >+ (unsigned long long)sc.sc_total, >+ (unsigned long long)sc.sc_total - sc.sc_free, >+ (unsigned long long)sc.sc_free, percentage); > > percentage = (sc.sc_dinodes + sc.sc_free) ? > (100.0 * sc.sc_dinodes / (sc.sc_dinodes + sc.sc_free)) + 0.5 : > 0; > printf(" %-15s%-15llu%-15llu%-15llu%u%%\n", "inodes", >- sc.sc_dinodes + sc.sc_free, sc.sc_dinodes, >- sc.sc_free, percentage); >+ (unsigned long long)sc.sc_dinodes + sc.sc_free, >+ (unsigned long long)sc.sc_dinodes, >+ (unsigned long long)sc.sc_free, percentage); > } > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 450838
: 309022