~xnox/upstart/fix-1234841

« back to all changes in this revision

Viewing changes to init/system.c

  • Committer: Dmitrijs Ledkovs
  • Date: 2013-11-03 02:56:57 UTC
  • mfrom: (1546.2.2 devpts-perms)
  • Revision ID: dmitrijs.ledkovs@canonical.com-20131103025657-ng5m8m61zecxx8aa
mergeĀ lp:~vorlon/upstart/lp.1244763

Show diffs side-by-side

added added

removed removed

Lines of Context:
165
165
 * system_mount:
166
166
 * @type: filesystem type,
167
167
 * @dir: mountpoint,
168
 
 * @flags: mount flags.
169
 
 *
170
 
 * Mount the kernel filesystem @type at @dir with @flags, if not already mounted.  This
171
 
 * is used to ensure that the proc and sysfs filesystems are always
172
 
 * available.
173
 
 *
174
 
 * Filesystems are always mounted with the MS_NODEV, MS_NOEXEC and MS_NOSUID
175
 
 * mount options, which are sensible for /proc and /sys.
 
168
 * @flags: mount flags,
 
169
 * @options: mount options.
 
170
 *
 
171
 * Mount the kernel filesystem @type at @dir with @flags and mount options
 
172
 * @options, if not already mounted.  This is used to ensure that the proc
 
173
 * and sysfs filesystems are always available.
176
174
 *
177
175
 * Returns: zero on success, negative value on raised error.
178
176
 **/
179
177
int
180
178
system_mount (const char *type,
181
179
              const char *dir,
182
 
              unsigned long flags)
 
180
              unsigned long flags,
 
181
              const char *options)
183
182
{
184
183
        nih_local char *parent = NULL;
185
184
        char *          ptr;
208
207
                return 0;
209
208
 
210
209
        /* Mount the filesystem */
211
 
        if (mount ("none", dir, type, flags, NULL) < 0)
 
210
        if (mount ("none", dir, type, flags, options) < 0)
212
211
                nih_return_system_error (-1);
213
212
 
214
213
        return 0;