do not try load IMQ modules
[tomato.git] / release / src-rt-6.x.4708 / router / rc / mtd.h
blob8e285df0c588cddee590dad942d52fec7b0c564a
1 /*
2 * MTD utility functions
4 * Copyright (C) 2009, Broadcom Corporation. All Rights Reserved.
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
13 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
15 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 * $Id: mtd.h,v 1.8 2009/12/02 20:02:50 Exp $
21 #ifndef _mtd_h_
22 #define _mtd_h_
25 * Open an MTD device
26 * @param mtd path to or partition name of MTD device
27 * @param flags open() flags
28 * @return return value of open()
30 extern int mtd_open(const char *mtd, int flags);
33 * Erase an MTD device
34 * @param mtd path to or partition name of MTD device
35 * @return 0 on success and errno on failure
37 extern int mtd_erase(const char *mtd);
40 * Write a file or a URL to an MTD device
41 * @param path file to write or a URL
42 * @param mtd path to or partition name of MTD device
43 * @return 0 on success and errno on failure
45 extern int mtd_write(const char *path, const char *mtd);
47 #endif /* _mtd_h_ */