~ubuntu-branches/debian/stretch/jfsutils/stretch

« back to all changes in this revision

Viewing changes to libfs/utilsubs.h

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Hornburg (Racke)
  • Date: 2006-08-02 21:15:09 UTC
  • mfrom: (1.2.2 upstream) (2.1.3 breezy)
  • Revision ID: james.westby@ubuntu.com-20060802211509-eoqwjtlgla5tu9dt
* new upstream release fixing stack buffer overflow (Closes: #343638)
* keep only reference to GPL in debian/copyright
* mark udeb package as such properly and create dependencies 
  (Closes: #381245, thanks to Frans Pop <fjp@debian.org> for the patch)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *
4
4
 *   This program is free software;  you can redistribute it and/or modify
5
5
 *   it under the terms of the GNU General Public License as published by
6
 
 *   the Free Software Foundation; either version 2 of the License, or 
 
6
 *   the Free Software Foundation; either version 2 of the License, or
7
7
 *   (at your option) any later version.
8
 
 * 
 
8
 *
9
9
 *   This program is distributed in the hope that it will be useful,
10
10
 *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
11
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
12
12
 *   the GNU General Public License for more details.
13
13
 *
14
14
 *   You should have received a copy of the GNU General Public License
15
 
 *   along with this program;  if not, write to the Free Software 
 
15
 *   along with this program;  if not, write to the Free Software
16
16
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
17
 */
18
18
#ifndef _H_UJFS_UTILSUBS
19
19
#define _H_UJFS_UTILSUBS
20
20
 
 
21
#include <stdio.h>
 
22
#include <fcntl.h>
 
23
 
21
24
/*
22
25
 *      utilsubs.h
23
26
 */
29
32
char prompt(char *str);
30
33
int more(void);
31
34
 
 
35
static inline FILE *fopen_excl(const char *path, const char *mode)
 
36
{
 
37
        int fd;
 
38
 
 
39
        /* Yeah, mode is ignored, we only use this to open for read/write */
 
40
        fd = open(path, O_RDWR | O_EXCL, 0);
 
41
        if (fd < 0)
 
42
                return NULL;
 
43
        return fdopen(fd, mode);
 
44
}
 
45
 
 
46
int Is_Device_Mounted(char *);
 
47
int Is_Device_Type_JFS(char *);
32
48
#endif                          /* _H_UJFS_UTILSUBS */