Changeset c16e54a in rtems


Ignore:
Timestamp:
May 23, 2016, 5:25:36 AM (4 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
8f9d07bb
Parents:
1503c1c3
git-author:
Chris Johns <chrisj@…> (05/23/16 05:25:36)
git-committer:
Chris Johns <chrisj@…> (05/25/16 05:47:34)
Message:

libfs/jff2: Avoid printk format warnings.

This change does not fix the printk format warnings rather
it ignores them.

Location:
cpukit/libfs/src/jffs2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/src/jffs2/include/linux/kernel-rtems.h

    r1503c1c3 rc16e54a  
    88 *  <rtems@embedded-brains.de>
    99 *
     10 * Copyright 2016 Chris Johns <chrisj@rtems.org>
     11 *
    1012 * The license and distribution terms for this file may be
    1113 * found in the file LICENSE in this distribution or at
     
    1517#ifndef __LINUX_RTEMS_IMPL_H__
    1618#define __LINUX_RTEMS_IMPL_H__
     19
     20#include <rtems.h>
     21#include <rtems/print.h>
    1722
    1823static inline char *do_kmemdup(const char *s, size_t n)
     
    2833}
    2934
     35/*
     36 * Provide a private printk to avoid all the formatting warnings in the JFFS2 code.
     37 */
     38static inline int jffs2_printk(const char* fmt, ...)
     39{
     40        va_list ap;
     41        int r;
     42        va_start(ap, fmt);
     43        r = vprintk(fmt, ap);
     44        va_end(ap);
     45        return r;
     46}
     47
     48#undef printk
     49#define printk jffs2_printk
     50
    3051#endif /* __LINUX_RTEMS_IMPL_H__ */
  • cpukit/libfs/src/jffs2/include/linux/kernel.h

    r1503c1c3 rc16e54a  
    22#define __LINUX_KERNEL_H__
    33
    4 #include <rtems.h>
    54#include <stdlib.h>
    65#include <string.h>
     
    8281
    8382#endif /* __LINUX_KERNEL_H__ */
    84 
    85 
    86 
    87 
  • cpukit/libfs/src/jffs2/src/dir-rtems.c

    r1503c1c3 rc16e54a  
    4040        /* NB: The 2.2 backport will need to explicitly check for '.' and '..' here */
    4141        for (fd_list = dir_f->dents; fd_list && fd_list->nhash <= hash; fd_list = fd_list->next) {
    42                 if (fd_list->nhash == hash && 
     42                if (fd_list->nhash == hash &&
    4343                    (!fd || fd_list->version > fd->version) &&
    4444                    strlen((char *)fd_list->name) == namelen &&
     
    5353                inode = jffs2_iget(dir_i->i_sb, ino);
    5454                if (IS_ERR(inode)) {
    55                         printk("jffs2_iget() failed for ino #%u\n", ino);
     55                        printk("jffs2_iget() failed for ino #%lu\n", ino);
    5656                        return inode;
    5757                } else {
     
    8282        if (!ri)
    8383                return -ENOMEM;
    84        
     84
    8585        c = JFFS2_SB_INFO(dir_i->i_sb);
    8686
     
    147147        if (!type) type = DT_REG;
    148148
    149         ret = jffs2_do_link(c, dir_f, f->inocache->ino, type, 
    150                             (const char * )d_name, 
     149        ret = jffs2_do_link(c, dir_f, f->inocache->ino, type,
     150                            (const char * )d_name,
    151151                            d_namelen, get_seconds());
    152152
     
    340340        uint32_t now;
    341341
    342 #if 0 /* FIXME -- this really doesn't belong in individual file systems. 
     342#if 0 /* FIXME -- this really doesn't belong in individual file systems.
    343343         The fileio code ought to do this for us, or at least part of it */
    344344        if (new_dentry->d_inode) {
    345                 if (S_ISDIR(d_inode->i_mode) && 
     345                if (S_ISDIR(d_inode->i_mode) &&
    346346                    !S_ISDIR(new_dentry->d_inode->i_mode)) {
    347347                        /* Cannot rename directory over non-directory */
     
    371371
    372372        /* XXX: We probably ought to alloc enough space for
    373            both nodes at the same time. Writing the new link, 
     373           both nodes at the same time. Writing the new link,
    374374           then getting -ENOSPC, is quite bad :)
    375375        */
    376376
    377377        /* Make a hard link */
    378        
     378
    379379        /* XXX: This is ugly */
    380380        type = (d_inode->i_mode & S_IFMT) >> 12;
     
    418418        return ret;
    419419}
    420 
Note: See TracChangeset for help on using the changeset viewer.